bond1: cannot enslave bond to itself. bond3: Enslaving veth3 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond5 bond1: Enslaving bond5 as a backup interface with a down link ============================================ WARNING: possible recursive locking detected 4.14.166-syzkaller #0 Not tainted -------------------------------------------- syz-executor577/7191 is trying to acquire lock: (&(&bond->stats_lock)->rlock#2/2){+.+.}, at: [] bond_get_stats+0xd2/0x4b0 drivers/net/bonding/bond_main.c:3416 but task is already holding lock: (&(&bond->stats_lock)->rlock#2/2){+.+.}, at: [] bond_get_stats+0xd2/0x4b0 drivers/net/bonding/bond_main.c:3416 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&(&bond->stats_lock)->rlock#2/2); lock(&(&bond->stats_lock)->rlock#2/2); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by syz-executor577/7191: #0: (rtnl_mutex){+.+.}, at: [] rtnl_lock net/core/rtnetlink.c:72 [inline] #0: (rtnl_mutex){+.+.}, at: [] rtnetlink_rcv_msg+0x339/0xb70 net/core/rtnetlink.c:4301 #1: (&(&bond->stats_lock)->rlock#2/2){+.+.}, at: [] bond_get_stats+0xd2/0x4b0 drivers/net/bonding/bond_main.c:3416 #2: (rcu_read_lock){....}, at: [] bond_get_nest_level drivers/net/bonding/bond_main.c:3405 [inline] #2: (rcu_read_lock){....}, at: [] bond_get_stats+0xb1/0x4b0 drivers/net/bonding/bond_main.c:3416 stack backtrace: CPU: 1 PID: 7191 Comm: syz-executor577 Not tainted 4.14.166-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x142/0x197 lib/dump_stack.c:58 print_deadlock_bug kernel/locking/lockdep.c:1796 [inline] check_deadlock kernel/locking/lockdep.c:1843 [inline] validate_chain kernel/locking/lockdep.c:2444 [inline] __lock_acquire.cold+0x2bf/0x8dc kernel/locking/lockdep.c:3487 lock_acquire+0x16f/0x430 kernel/locking/lockdep.c:3994 _raw_spin_lock_nested+0x35/0x50 kernel/locking/spinlock.c:362 bond_get_stats+0xd2/0x4b0 drivers/net/bonding/bond_main.c:3416 dev_get_stats+0x8e/0x250 net/core/dev.c:7994 bond_get_stats+0x20f/0x4b0 drivers/net/bonding/bond_main.c:3422 dev_get_stats+0x8e/0x250 net/core/dev.c:7994 rtnl_fill_stats+0x4d/0xac0 net/core/rtnetlink.c:1079 rtnl_fill_ifinfo+0xe45/0x32c0 net/core/rtnetlink.c:1385 rtmsg_ifinfo_build_skb+0x9b/0x140 net/core/rtnetlink.c:2903 rtmsg_ifinfo_event.part.0+0x35/0xc0 net/core/rtnetlink.c:2933 rtmsg_ifinfo_event net/core/rtnetlink.c:4357 [inline] rtnetlink_event+0xf4/0x120 net/core/rtnetlink.c:4350 notifier_call_chain+0x111/0x1b0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] netdev_features_change net/core/dev.c:1300 [inline] netdev_change_features+0x66/0x80 net/core/dev.c:7458 bond_compute_features.isra.0+0x484/0x8d0 drivers/net/bonding/bond_main.c:1122 bond_slave_netdev_event drivers/net/bonding/bond_main.c:3150 [inline] bond_netdev_event+0x493/0x8e0 drivers/net/bonding/bond_main.c:3191 notifier_call_chain+0x111/0x1b0 kernel/notifier.c:93 __raw_notifier_call_chain kernel/notifier.c:394 [inline] raw_notifier_call_chain+0x2e/0x40 kernel/notifier.c:401 call_netdevice_notifiers_info+0x56/0x70 net/core/dev.c:1671 call_netdevice_notifiers net/core/dev.c:1687 [inline] netdev_features_change net/core/dev.c:1300 [inline] netdev_change_features+0x66/0x80 net/core/dev.c:7458 bond_compute_features.isra.0+0x484/0x8d0 drivers/net/bonding/bond_main.c:1122 bond_enslave+0x15ef/0x4c70 drivers/net/bonding/bond_main.c:1731 do_set_master net/core/rtnetlink.c:1961 [inline] do_set_master+0x19f/0x200 net/core/rtnetlink.c:1936 rtnl_newlink+0x12ed/0x1700 net/core/rtnetlink.c:2747 rtnetlink_rcv_msg+0x3da/0xb70 net/core/rtnetlink.c:4306 netlink_rcv_skb+0x14f/0x3c0 net/netlink/af_netlink.c:2432 rtnetlink_rcv+0x1d/0x30 net/core/rtnetlink.c:4318 netlink_unicast_kernel net/netlink/af_netlink.c:1286 [inline] netlink_unicast+0x44d/0x650 net/netlink/af_netlink.c:1312 netlink_sendmsg+0x7c4/0xc60 net/netlink/af_netlink.c:1877 sock_sendmsg_nosec net/socket.c:646 [inline] sock_sendmsg+0xce/0x110 net/socket.c:656 ___sys_sendmsg+0x70a/0x840 net/socket.c:2062 __sys_sendmsg+0xb9/0x140 net/socket.c:2096 SYSC_sendmsg net/socket.c:2107 [inline] SyS_sendmsg+0x2d/0x50 net/socket.c:2103 do_syscall_64+0x1e8/0x640 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x4495e9 RSP: 002b:00007f4e804d7ce8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00000000006e5a38 RCX: 00000000004495e9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00000000006e5a30 R08: 0000000000000008 R09: 0000000000000000 R10: 000000000000000a R11: 0000000000000246 R12: 00000000006e5a3c R13: 00007ffd3ac120df R14: 00007f4e804d89c0 R15: 20c49ba5e353f7cf bond5: Enslaving veth5 as a backup interface with a down link syz-executor577 (7191) used greatest stack depth: 23368 bytes left 8021q: adding VLAN 0 to HW filter on device bond6 bond1: Enslaving bond6 as a backup interface with a down link bond6: Enslaving veth7 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond8 bond1: Enslaving bond8 as a backup interface with a down link bond12: Enslaving veth15 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond12 bond1: Enslaving bond12 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond13 bond1: Enslaving bond13 as a backup interface with a down link bond13: Enslaving veth17 as a backup interface with a down link bond14: Enslaving veth19 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond14 bond1: Enslaving bond14 as a backup interface with a down link bond15: Enslaving veth21 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond15 bond1: Enslaving bond15 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond16 bond1: Enslaving bond16 as a backup interface with a down link bond16: Enslaving veth23 as a backup interface with a down link bond17: Enslaving veth25 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond17 bond1: Enslaving bond17 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond18 bond1: Enslaving bond18 as a backup interface with a down link bond20: Enslaving veth29 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond20 bond1: Enslaving bond20 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond21 bond1: Enslaving bond21 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond24 bond1: Enslaving bond24 as a backup interface with a down link bond24: Enslaving veth35 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond25 bond1: Enslaving bond25 as a backup interface with a down link bond25: Enslaving veth37 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond26 bond1: Enslaving bond26 as a backup interface with a down link bond28: Enslaving veth41 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond28 bond1: Enslaving bond28 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond31 bond1: Enslaving bond31 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond33 bond1: Enslaving bond33 as a backup interface with a down link bond35: Enslaving veth53 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond35 bond1: Enslaving bond35 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond36 bond1: Enslaving bond36 as a backup interface with a down link bond36: Enslaving veth55 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond37 bond1: Enslaving bond37 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond40 bond1: Enslaving bond40 as a backup interface with a down link bond40: Enslaving veth61 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond41 bond1: Enslaving bond41 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond43 bond1: Enslaving bond43 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond45 bond1: Enslaving bond45 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond47 bond1: Enslaving bond47 as a backup interface with a down link bond47: Enslaving veth69 as a backup interface with a down link bond50: Enslaving veth73 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond51 bond1: Enslaving bond51 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond53 bond1: Enslaving bond53 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond57 bond1: Enslaving bond57 as a backup interface with a down link bond59: Enslaving veth85 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond59 bond1: Enslaving bond59 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond60 bond1: Enslaving bond60 as a backup interface with a down link bond60: Enslaving veth87 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond61 bond1: Enslaving bond61 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond63 bond1: Enslaving bond63 as a backup interface with a down link bond63: Enslaving veth91 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond65 bond1: Enslaving bond65 as a backup interface with a down link bond65: Enslaving veth95 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond68 bond1: Enslaving bond68 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond70 bond1: Enslaving bond70 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond72 bond1: Enslaving bond72 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond74 bond1: Enslaving bond74 as a backup interface with a down link bond74: Enslaving veth105 as a backup interface with a down link bond75: Enslaving veth107 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond75 bond1: Enslaving bond75 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond76 bond1: Enslaving bond76 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond78 bond1: Enslaving bond78 as a backup interface with a down link bond78: Enslaving veth113 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond79 bond1: Enslaving bond79 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond81 bond1: Enslaving bond81 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond84 bond1: Enslaving bond84 as a backup interface with a down link bond84: Enslaving veth121 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond85 bond1: Enslaving bond85 as a backup interface with a down link bond85: Enslaving veth123 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond86 bond1: Enslaving bond86 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond88 bond1: Enslaving bond88 as a backup interface with a down link bond90: Enslaving veth129 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond90 bond1: Enslaving bond90 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond91 bond1: Enslaving bond91 as a backup interface with a down link bond93: Enslaving veth133 as a backup interface with a down link bond94: Enslaving veth135 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond94 bond1: Enslaving bond94 as a backup interface with a down link bond95: Enslaving veth137 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond95 bond1: Enslaving bond95 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond96 bond1: Enslaving bond96 as a backup interface with a down link bond96: Enslaving veth139 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond97 bond1: Enslaving bond97 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond99 bond1: Enslaving bond99 as a backup interface with a down link bond99: Enslaving veth143 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond100 bond1: Enslaving bond100 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond102 bond1: Enslaving bond102 as a backup interface with a down link bond102: Enslaving veth147 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond104 bond1: Enslaving bond104 as a backup interface with a down link bond104: Enslaving veth151 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond105 bond1: Enslaving bond105 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond107 bond1: Enslaving bond107 as a backup interface with a down link bond110: Enslaving veth159 as a backup interface with a down link bond111: Enslaving veth161 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond112 bond1: Enslaving bond112 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond114 bond1: Enslaving bond114 as a backup interface with a down link bond114: Enslaving veth165 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond115 bond1: Enslaving bond115 as a backup interface with a down link bond115: Enslaving veth167 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond116 bond1: Enslaving bond116 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond121 bond1: Enslaving bond121 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond123 bond1: Enslaving bond123 as a backup interface with a down link bond123: Enslaving veth177 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond124 bond1: Enslaving bond124 as a backup interface with a down link bond124: Enslaving veth179 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond125 bond1: Enslaving bond125 as a backup interface with a down link bond125: Enslaving veth181 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond126 bond1: Enslaving bond126 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond128 bond1: Enslaving bond128 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond130 bond1: Enslaving bond130 as a backup interface with a down link bond130: Enslaving veth187 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond131 bond1: Enslaving bond131 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond133 bond1: Enslaving bond133 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond135 bond1: Enslaving bond135 as a backup interface with a down link bond135: Enslaving veth193 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond136 bond1: Enslaving bond136 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond138 bond1: Enslaving bond138 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond140 bond1: Enslaving bond140 as a backup interface with a down link 8021q: adding VLAN 0 to HW filter on device bond142 bond1: Enslaving bond142 as a backup interface with a down link