device bond1 entered promiscuous mode device batadv2 entered promiscuous mode ====================================================== WARNING: possible circular locking dependency detected 4.19.211-syzkaller #0 Not tainted ------------------------------------------------------ syz-executor.0/22288 is trying to acquire lock: 00000000a61bfb51 (&(&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: 00000000c8c9869f (&(&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. IPVS: ftp: loaded support on port[0] = 21 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 ---- ---- IPVS: ftp: loaded support on port[0] = 21 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.0/22288: #0: 0000000022d55afd (rtnl_mutex){+.+.}, at: rtnl_lock net/core/rtnetlink.c:77 [inline] #0: 0000000022d55afd (rtnl_mutex){+.+.}, at: rtnetlink_rcv_msg+0x3fe/0xb80 net/core/rtnetlink.c:4779 #1: 00000000c8c9869f (&(&bond->stats_lock)->rlock#3/3){+.+.}, at: bond_get_stats+0xca/0x500 drivers/net/bonding/bond_main.c:3492 #2: 00000000d4403f68 (rcu_read_lock){....}, at: bond_get_nest_level drivers/net/bonding/bond_main.c:3481 [inline] #2: 00000000d4403f68 (rcu_read_lock){....}, at: bond_get_stats+0xae/0x500 drivers/net/bonding/bond_main.c:3492 stack backtrace: CPU: 1 PID: 22288 Comm: syz-executor.0 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:0x7ff545d4c0c9 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:00007ff54429d168 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007ff545e6c050 RCX: 00007ff545d4c0c9 RDX: 0000000000000000 RSI: 0000000020000080 RDI: 0000000000000006 RBP: 00007ff545da7ae9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffc59215e1f R14: 00007ff54429d300 R15: 0000000000022000 bond0: Enslaving bond1 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 batadv3 bond2: making interface batadv3 the new active one bond2: Enslaving batadv3 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond2 device bond2 entered promiscuous mode device batadv3 entered promiscuous mode bond0: Enslaving bond2 as an active interface with an up link IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 netlink: 'syz-executor.0': attribute type 1 has an invalid length. IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 8021q: adding VLAN 0 to HW filter on device batadv4 bond3: making interface batadv4 the new active one bond3: Enslaving batadv4 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond3 device bond3 entered promiscuous mode device batadv4 entered promiscuous mode bond0: Enslaving bond3 as an active interface with an up link netlink: 'syz-executor.0': attribute type 1 has an invalid length. IPVS: ftp: loaded support on port[0] = 21 8021q: adding VLAN 0 to HW filter on device batadv5 bond4: making interface batadv5 the new active one bond4: Enslaving batadv5 as an active interface with an up link 8021q: adding VLAN 0 to HW filter on device bond4 device bond4 entered promiscuous mode device batadv5 entered promiscuous mode bond0: Enslaving bond4 as an active interface with an up link IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode REISERFS warning (device loop1): journal-1393 journal_init: journal 1st super block is invalid: 1st reserved block 18, but actual 1st block is 0 syz-executor.5 (23032) used greatest stack depth: 19760 bytes left REISERFS warning (device loop1): sh-2022 reiserfs_fill_super: unable to initialize journal space IPVS: ftp: loaded support on port[0] = 21 IPVS: ftp: loaded support on port[0] = 21 REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode Process accounting resumed REISERFS warning (device loop1): journal-1393 journal_init: journal 1st super block is invalid: 1st reserved block 18, but actual 1st block is 0 netlink: 28 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS warning (device loop1): sh-2022 reiserfs_fill_super: unable to initialize journal space netlink: 28 bytes leftover after parsing attributes in process `syz-executor.2'. Process accounting resumed netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. Process accounting resumed netlink: 28 bytes leftover after parsing attributes in process `syz-executor.2'. REISERFS (device loop1): found reiserfs format "3.6" with non-standard journal REISERFS (device loop1): using ordered data mode REISERFS warning (device loop1): journal-1393 journal_init: journal 1st super block is invalid: 1st reserved block 18, but actual 1st block is 0 REISERFS warning (device loop1): sh-2022 reiserfs_fill_super: unable to initialize journal space netlink: 24 bytes leftover after parsing attributes in process `syz-executor.4'. Process accounting resumed netlink: 28 bytes leftover after parsing attributes in process `syz-executor.2'. IPVS: ftp: loaded support on port[0] = 21