bond5: making interface batadv7 the new active one bond5: Enslaving batadv7 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond5 ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.5/26530 is trying to acquire lock: 000000008b0e16db (&(&bond->stats_lock)->rlock#2/2){+.+.}, at: bond_get_stats+0xca/0x500 drivers/net/bonding/bond_main.c:3492 but task is already holding lock: 00000000aadee581 (&(&bond->stats_lock)->rlock#3/3){+.+.}, at: bond_get_stats+0xca/0x500 drivers/net/bonding/bond_main.c:3492 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&(&bond->stats_lock)->rlock#3/3){+.+.}: bond_get_stats+0xca/0x500 drivers/net/bonding/bond_main.c:3492 dev_get_stats+0xa5/0x2b0 net/core/dev.c:9061 bond_get_stats+0x20f/0x500 drivers/net/bonding/bond_main.c:3498 dev_get_stats+0xa5/0x2b0 net/core/dev.c:9061 rtnl_fill_stats+0x48/0xa90 net/core/rtnetlink.c:1176 rtnl_fill_ifinfo+0xf8e/0x36d0 net/core/rtnetlink.c:1663 rtmsg_ifinfo_build_skb+0xcd/0x1a0 net/core/rtnetlink.c:3357 rtmsg_ifinfo_event net/core/rtnetlink.c:3389 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3380 [inline] rtnetlink_event+0x123/0x1d0 net/core/rtnetlink.c:4833 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] netdev_features_change net/core/dev.c:1330 [inline] netdev_change_features+0x7e/0xb0 net/core/dev.c:8490 bond_compute_features+0x476/0x8c0 drivers/net/bonding/bond_main.c:1116 bond_slave_netdev_event drivers/net/bonding/bond_main.c:3226 [inline] bond_netdev_event+0xa96/0xe50 drivers/net/bonding/bond_main.c:3267 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] netdev_features_change net/core/dev.c:1330 [inline] netdev_change_features+0x7e/0xb0 net/core/dev.c:8490 bond_compute_features+0x476/0x8c0 drivers/net/bonding/bond_main.c:1116 bond_enslave+0x3dc9/0x5250 drivers/net/bonding/bond_main.c:1780 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2321 rtnl_newlink+0x1279/0x15c0 net/core/rtnetlink.c:3170 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe -> #0 (&(&bond->stats_lock)->rlock#2/2){+.+.}: _raw_spin_lock_nested+0x30/0x40 kernel/locking/spinlock.c:354 bond_get_stats+0xca/0x500 drivers/net/bonding/bond_main.c:3492 dev_get_stats+0xa5/0x2b0 net/core/dev.c:9061 bond_get_stats+0x20f/0x500 drivers/net/bonding/bond_main.c:3498 dev_get_stats+0xa5/0x2b0 net/core/dev.c:9061 rtnl_fill_stats+0x48/0xa90 net/core/rtnetlink.c:1176 rtnl_fill_ifinfo+0xf8e/0x36d0 net/core/rtnetlink.c:1663 rtmsg_ifinfo_build_skb+0xcd/0x1a0 net/core/rtnetlink.c:3357 rtmsg_ifinfo_event net/core/rtnetlink.c:3389 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3380 [inline] rtnetlink_event+0x123/0x1d0 net/core/rtnetlink.c:4833 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] netdev_features_change net/core/dev.c:1330 [inline] netdev_change_features+0x7e/0xb0 net/core/dev.c:8490 bond_compute_features+0x476/0x8c0 drivers/net/bonding/bond_main.c:1116 bond_enslave+0x3dc9/0x5250 drivers/net/bonding/bond_main.c:1780 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2321 do_setlink+0x7ec/0x3540 net/core/rtnetlink.c:2455 rtnl_newlink+0xda9/0x15c0 net/core/rtnetlink.c:3077 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&(&bond->stats_lock)->rlock#3/3); lock(&(&bond->stats_lock)->rlock#2/2); lock(&(&bond->stats_lock)->rlock#3/3); lock(&(&bond->stats_lock)->rlock#2/2); *** DEADLOCK *** 3 locks held by syz-executor.5/26530: #0: 00000000988d6498 (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 00000000988d6498 (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779 #1: 00000000aadee581 (&(&bond->stats_lock)->rlock#3/3){+.+.}, at: bond_get_stats+0xca/0x500 drivers/net/bonding/bond_main.c:3492 #2: 00000000bd53bd3e (rcu_read_lock){....}, at: bond_get_nest_level drivers/net/bonding/bond_main.c:3481 [inline] #2: 00000000bd53bd3e (rcu_read_lock){....}, at: bond_get_stats+0xae/0x500 drivers/net/bonding/bond_main.c:3492 stack backtrace: CPU: 0 PID: 26530 Comm: syz-executor.5 Not tainted 4.19.211-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/12/2023 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2ef lib/dump_stack.c:118 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1222 check_prev_add kernel/locking/lockdep.c:1866 [inline] check_prevs_add kernel/locking/lockdep.c:1979 [inline] validate_chain kernel/locking/lockdep.c:2420 [inline] __lock_acquire+0x30c9/0x3ff0 kernel/locking/lockdep.c:3416 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3908 _raw_spin_lock_nested+0x30/0x40 kernel/locking/spinlock.c:354 bond_get_stats+0xca/0x500 drivers/net/bonding/bond_main.c:3492 dev_get_stats+0xa5/0x2b0 net/core/dev.c:9061 bond_get_stats+0x20f/0x500 drivers/net/bonding/bond_main.c:3498 dev_get_stats+0xa5/0x2b0 net/core/dev.c:9061 rtnl_fill_stats+0x48/0xa90 net/core/rtnetlink.c:1176 rtnl_fill_ifinfo+0xf8e/0x36d0 net/core/rtnetlink.c:1663 rtmsg_ifinfo_build_skb+0xcd/0x1a0 net/core/rtnetlink.c:3357 rtmsg_ifinfo_event net/core/rtnetlink.c:3389 [inline] rtmsg_ifinfo_event net/core/rtnetlink.c:3380 [inline] rtnetlink_event+0x123/0x1d0 net/core/rtnetlink.c:4833 notifier_call_chain+0xc0/0x230 kernel/notifier.c:93 call_netdevice_notifiers net/core/dev.c:1762 [inline] netdev_features_change net/core/dev.c:1330 [inline] netdev_change_features+0x7e/0xb0 net/core/dev.c:8490 bond_compute_features+0x476/0x8c0 drivers/net/bonding/bond_main.c:1116 bond_enslave+0x3dc9/0x5250 drivers/net/bonding/bond_main.c:1780 do_set_master+0x1c8/0x220 net/core/rtnetlink.c:2321 do_setlink+0x7ec/0x3540 net/core/rtnetlink.c:2455 rtnl_newlink+0xda9/0x15c0 net/core/rtnetlink.c:3077 rtnetlink_rcv_msg+0x453/0xb80 net/core/rtnetlink.c:4782 netlink_rcv_skb+0x160/0x440 net/netlink/af_netlink.c:2463 netlink_unicast_kernel net/netlink/af_netlink.c:1325 [inline] netlink_unicast+0x4d5/0x690 net/netlink/af_netlink.c:1351 netlink_sendmsg+0x6c3/0xc50 net/netlink/af_netlink.c:1917 sock_sendmsg_nosec net/socket.c:651 [inline] sock_sendmsg+0xc3/0x120 net/socket.c:661 ___sys_sendmsg+0x7bb/0x8e0 net/socket.c:2227 __sys_sendmsg net/socket.c:2265 [inline] __do_sys_sendmsg net/socket.c:2274 [inline] __se_sys_sendmsg net/socket.c:2272 [inline] __x64_sys_sendmsg+0x132/0x220 net/socket.c:2272 do_syscall_64+0xf9/0x620 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x7f98dd0090c9 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 f1 19 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f98db57b168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f98dd128f80 RCX: 00007f98dd0090c9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000006 RBP: 00007f98dd064ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc948d766f R14: 00007f98db57b300 R15: 0000000000022000 bond0: Enslaving bond5 as an active interface with an up link netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 'syz-executor.5': attribute type 1 has an invalid length. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.2'. netlink: 24 bytes leftover after parsing attributes in process `syz-executor.0'. netlink: 'syz-executor.4': attribute type 1 has an invalid length. 8021q: adding VLAN 0 to HW filter on device batadv8 bond6: making interface batadv8 the new active one bond6: Enslaving batadv8 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond6 bond0: Enslaving bond6 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device batadv1 bond5: making interface batadv1 the new active one bond5: Enslaving batadv1 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond5 bond0: Enslaving bond5 as an active interface with an up link netlink: 'syz-executor.4': attribute type 1 has an invalid length. netlink: 'syz-executor.0': attribute type 1 has an invalid length. netlink: 'syz-executor.5': attribute type 1 has an invalid length. 8021q: adding VLAN 0 to HW filter on device batadv25 bond9: making interface batadv25 the new active one bond9: Enslaving batadv25 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device batadv9 bond7: making interface batadv9 the new active one bond7: Enslaving batadv9 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond9 bond0: Enslaving bond9 as an active interface with an up link netlink: 'syz-executor.0': attribute type 1 has an invalid length. 8021q: adding VLAN 0 to HW filter on device batadv2 bond6: making interface batadv2 the new active one bond6: Enslaving batadv2 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device batadv26 bond10: making interface batadv26 the new active one bond10: Enslaving batadv26 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond6 bond0: Enslaving bond6 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond10 bond0: Enslaving bond10 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond7 bond0: Enslaving bond7 as an active interface with an up link netlink: 'syz-executor.5': attribute type 1 has an invalid length. 8021q: adding VLAN 0 to HW filter on device batadv10 bond8: making interface batadv10 the new active one bond8: Enslaving batadv10 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond8 bond0: Enslaving bond8 as an active interface with an up link netlink: 'syz-executor.4': attribute type 1 has an invalid length. 8021q: adding VLAN 0 to HW filter on device batadv3 bond7: making interface batadv3 the new active one bond7: Enslaving batadv3 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond7 bond0: Enslaving bond7 as an active interface with an up link netlink: 'syz-executor.0': attribute type 1 has an invalid length. 8021q: adding VLAN 0 to HW filter on device batadv27 bond11: making interface batadv27 the new active one bond11: Enslaving batadv27 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond11 bond0: Enslaving bond11 as an active interface with an up link wlan1: Created IBSS using preconfigured BSSID 50:50:50:50:50:50 wlan1: Creating new IBSS network, BSSID 50:50:50:50:50:50