binder: 8684:8686 ioctl c0306201 0 returned -14 ====================================================== WARNING: possible circular locking dependency detected 5.15.176-syzkaller #0 Not tainted ------------------------------------------------------ syz.6.987/8686 is trying to acquire lock: ffffffff8dd7c2f8 (nr_neigh_list_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] ffffffff8dd7c2f8 (nr_neigh_list_lock){+...}-{2:2}, at: nr_remove_neigh+0x25/0xe0 net/netrom/nr_route.c:307 but task is already holding lock: ffff888025c77570 (&nr_node->node_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] ffff888025c77570 (&nr_node->node_lock){+...}-{2:2}, at: nr_node_lock include/net/netrom.h:151 [inline] ffff888025c77570 (&nr_node->node_lock){+...}-{2:2}, at: nr_add_node+0xfb2/0x2210 net/netrom/nr_route.c:214 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&nr_node->node_lock){+...}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:368 [inline] nr_node_lock include/net/netrom.h:151 [inline] nr_rt_device_down+0x155/0x7b0 net/netrom/nr_route.c:519 nr_device_event+0x12b/0x140 net/netrom/af_netrom.c:126 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] call_netdevice_notifiers_extack net/core/dev.c:2030 [inline] call_netdevice_notifiers net/core/dev.c:2044 [inline] dev_close_many+0x37c/0x530 net/core/dev.c:1619 dev_close+0x1b3/0x2b0 net/core/dev.c:1641 bpq_device_event+0x3c3/0x9d0 drivers/net/hamradio/bpqether.c:548 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] call_netdevice_notifiers_extack net/core/dev.c:2030 [inline] call_netdevice_notifiers net/core/dev.c:2044 [inline] dev_close_many+0x37c/0x530 net/core/dev.c:1619 dev_close+0x1b3/0x2b0 net/core/dev.c:1641 bond_setup_by_slave+0x66/0x390 drivers/net/bonding/bond_main.c:1471 bond_enslave+0x7b1/0x3c20 drivers/net/bonding/bond_main.c:1855 bond_do_ioctl+0x2a1/0xb40 drivers/net/bonding/bond_main.c:4238 dev_ifsioc+0xd7a/0x10c0 net/core/dev_ioctl.c:417 dev_ioctl+0x504/0xf60 net/core/dev_ioctl.c:587 sock_do_ioctl+0x34f/0x5a0 net/socket.c:1154 sock_ioctl+0x47f/0x770 net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 (nr_node_list_lock){+...}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:368 [inline] nr_rt_device_down+0xb1/0x7b0 net/netrom/nr_route.c:517 nr_device_event+0x12b/0x140 net/netrom/af_netrom.c:126 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] call_netdevice_notifiers_extack net/core/dev.c:2030 [inline] call_netdevice_notifiers net/core/dev.c:2044 [inline] dev_close_many+0x37c/0x530 net/core/dev.c:1619 dev_close+0x1b3/0x2b0 net/core/dev.c:1641 bpq_device_event+0x3c3/0x9d0 drivers/net/hamradio/bpqether.c:548 notifier_call_chain kernel/notifier.c:83 [inline] raw_notifier_call_chain+0xd0/0x170 kernel/notifier.c:391 call_netdevice_notifiers_info net/core/dev.c:2018 [inline] call_netdevice_notifiers_extack net/core/dev.c:2030 [inline] call_netdevice_notifiers net/core/dev.c:2044 [inline] dev_close_many+0x37c/0x530 net/core/dev.c:1619 dev_close+0x1b3/0x2b0 net/core/dev.c:1641 bond_setup_by_slave+0x66/0x390 drivers/net/bonding/bond_main.c:1471 bond_enslave+0x7b1/0x3c20 drivers/net/bonding/bond_main.c:1855 bond_do_ioctl+0x2a1/0xb40 drivers/net/bonding/bond_main.c:4238 dev_ifsioc+0xd7a/0x10c0 net/core/dev_ioctl.c:417 dev_ioctl+0x504/0xf60 net/core/dev_ioctl.c:587 sock_do_ioctl+0x34f/0x5a0 net/socket.c:1154 sock_ioctl+0x47f/0x770 net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #0 (nr_neigh_list_lock){+...}-{2:2}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:368 [inline] nr_remove_neigh+0x25/0xe0 net/netrom/nr_route.c:307 nr_add_node+0x14ef/0x2210 net/netrom/nr_route.c:249 nr_rt_ioctl+0xeee/0x1880 net/netrom/nr_route.c:651 sock_do_ioctl+0x11d/0x5a0 net/socket.c:1140 sock_ioctl+0x47f/0x770 net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 other info that might help us debug this: Chain exists of: nr_neigh_list_lock --> nr_node_list_lock --> &nr_node->node_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&nr_node->node_lock); lock(nr_node_list_lock); lock(&nr_node->node_lock); lock(nr_neigh_list_lock); *** DEADLOCK *** 1 lock held by syz.6.987/8686: #0: ffff888025c77570 (&nr_node->node_lock){+...}-{2:2}, at: spin_lock_bh include/linux/spinlock.h:368 [inline] #0: ffff888025c77570 (&nr_node->node_lock){+...}-{2:2}, at: nr_node_lock include/net/netrom.h:151 [inline] #0: ffff888025c77570 (&nr_node->node_lock){+...}-{2:2}, at: nr_add_node+0xfb2/0x2210 net/netrom/nr_route.c:214 stack backtrace: CPU: 1 PID: 8686 Comm: syz.6.987 Not tainted 5.15.176-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x31/0x40 kernel/locking/spinlock.c:178 spin_lock_bh include/linux/spinlock.h:368 [inline] nr_remove_neigh+0x25/0xe0 net/netrom/nr_route.c:307 nr_add_node+0x14ef/0x2210 net/netrom/nr_route.c:249 nr_rt_ioctl+0xeee/0x1880 net/netrom/nr_route.c:651 sock_do_ioctl+0x11d/0x5a0 net/socket.c:1140 sock_ioctl+0x47f/0x770 net/socket.c:1257 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:874 [inline] __se_sys_ioctl+0xf1/0x160 fs/ioctl.c:860 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f1dbcca3d29 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f1dbab14038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1dbce93fa0 RCX: 00007f1dbcca3d29 RDX: 0000000020000280 RSI: 000000000000890b RDI: 0000000000000004 RBP: 00007f1dbcd1fb08 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1dbce93fa0 R15: 00007ffe4fafca18 bond0: (slave rose0): Error: Device is in use and cannot be enslaved