batman_adv: batadv0: Removing interface: batadv_slave_1 ============================================ WARNING: possible recursive locking detected 6.15.0-rc1-syzkaller-g2fe2b96c3818 #0 Not tainted -------------------------------------------- kworker/u8:12/7050 is trying to acquire lock: ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2751 [inline] ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock_ops include/net/netdev_lock.h:42 [inline] ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: dev_set_allmulti+0xfc/0x218 net/core/dev_api.c:288 but task is already holding lock: ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2751 [inline] ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock_ops include/net/netdev_lock.h:42 [inline] ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: unregister_netdevice_many_notify+0x4b8/0x210c net/core/dev.c:11947 and the lock comparison function returns 0: other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&dev_instance_lock_key#3); lock(&dev_instance_lock_key#3); *** DEADLOCK *** May be due to missing lock nesting notation 5 locks held by kworker/u8:12/7050: #0: ffff0000c183a148 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x674/0x1638 kernel/workqueue.c:3212 #1: ffff8000a13c7b80 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x708/0x1638 kernel/workqueue.c:3212 #2: ffff800093074a90 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0x148/0xa48 net/core/net_namespace.c:608 #3: ffff8000930815a8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:80 #4: ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2751 [inline] #4: ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock_ops include/net/netdev_lock.h:42 [inline] #4: ffff0000eddb4d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: unregister_netdevice_many_notify+0x4b8/0x210c net/core/dev.c:11947 stack backtrace: CPU: 0 UID: 0 PID: 7050 Comm: kworker/u8:12 Not tainted 6.15.0-rc1-syzkaller-g2fe2b96c3818 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Workqueue: netns cleanup_net Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_deadlock_bug+0x338/0x340 kernel/locking/lockdep.c:3042 check_deadlock kernel/locking/lockdep.c:3094 [inline] validate_chain kernel/locking/lockdep.c:3896 [inline] __lock_acquire+0x164c/0x32c4 kernel/locking/lockdep.c:5235 lock_acquire+0x150/0x2e8 kernel/locking/lockdep.c:5866 __mutex_lock_common+0x1f0/0x2604 kernel/locking/mutex.c:601 __mutex_lock kernel/locking/mutex.c:746 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:798 netdev_lock include/linux/netdevice.h:2751 [inline] netdev_lock_ops include/net/netdev_lock.h:42 [inline] dev_set_allmulti+0xfc/0x218 net/core/dev_api.c:288 macvlan_stop+0x194/0x368 drivers/net/macvlan.c:704 __dev_close_many+0x428/0x76c net/core/dev.c:1709 dev_close_many+0x1e0/0x474 net/core/dev.c:1734 unregister_netdevice_many_notify+0x52c/0x210c net/core/dev.c:11949 unregister_netdevice_many net/core/dev.c:12044 [inline] default_device_exit_batch+0x904/0x984 net/core/dev.c:12536 ops_exit_list net/core/net_namespace.c:177 [inline] cleanup_net+0x6c4/0xa48 net/core/net_namespace.c:654 process_one_work+0x810/0x1638 kernel/workqueue.c:3238 process_scheduled_works kernel/workqueue.c:3319 [inline] worker_thread+0x97c/0xf08 kernel/workqueue.c:3400 kthread+0x674/0x7dc kernel/kthread.c:464 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862