batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Removing interface: batadv_slave_0 batman_adv: batadv0: Interface deactivated: batadv_slave_1 batman_adv: batadv0: Removing interface: batadv_slave_1 ====================================================== WARNING: possible circular locking dependency detected 6.16.0-rc3-syzkaller-00044-g7595b66ae9de #0 Not tainted ------------------------------------------------------ kworker/u8:19/9878 is trying to acquire lock: ffff88802f4cce00 (team->team_lock_key#17){+.+.}-{4:4}, at: team_port_change_check drivers/net/team/team_core.c:2966 [inline] ffff88802f4cce00 (team->team_lock_key#17){+.+.}-{4:4}, at: team_device_event+0x182/0xa20 drivers/net/team/team_core.c:2992 but task is already holding lock: ffff88807ea06d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2756 [inline] ffff88807ea06d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: unregister_netdevice_many_notify+0x5a1/0x2320 net/core/dev.c:12036 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&dev_instance_lock_key#3){+.+.}-{4:4}: lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __mutex_lock_common kernel/locking/mutex.c:602 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747 netdev_lock include/linux/netdevice.h:2756 [inline] netdev_lock_ops include/net/netdev_lock.h:42 [inline] dev_set_mtu+0x10e/0x260 net/core/dev_api.c:247 team_port_add drivers/net/team/team_core.c:1215 [inline] team_add_slave+0x8b8/0x2840 drivers/net/team/team_core.c:1989 do_set_master+0x533/0x6d0 net/core/rtnetlink.c:2946 do_setlink+0xcf0/0x41c0 net/core/rtnetlink.c:3148 rtnl_changelink net/core/rtnetlink.c:3759 [inline] __rtnl_newlink net/core/rtnetlink.c:3918 [inline] rtnl_newlink+0x160b/0x1c70 net/core/rtnetlink.c:4055 rtnetlink_rcv_msg+0x7cf/0xb70 net/core/rtnetlink.c:6944 netlink_rcv_skb+0x208/0x470 net/netlink/af_netlink.c:2534 netlink_unicast_kernel net/netlink/af_netlink.c:1313 [inline] netlink_unicast+0x75b/0x8d0 net/netlink/af_netlink.c:1339 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1883 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0x21c/0x270 net/socket.c:727 ____sys_sendmsg+0x505/0x830 net/socket.c:2566 ___sys_sendmsg+0x21f/0x2a0 net/socket.c:2620 __sys_sendmsg net/socket.c:2652 [inline] __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __x64_sys_sendmsg+0x19b/0x260 net/socket.c:2655 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0xfa/0x3b0 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (team->team_lock_key#17){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __mutex_lock_common kernel/locking/mutex.c:602 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747 team_port_change_check drivers/net/team/team_core.c:2966 [inline] team_device_event+0x182/0xa20 drivers/net/team/team_core.c:2992 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] dev_close_many+0x29c/0x410 net/core/dev.c:1785 unregister_netdevice_many_notify+0x619/0x2320 net/core/dev.c:12039 unregister_netdevice_many net/core/dev.c:12140 [inline] default_device_exit_batch+0x819/0x890 net/core/dev.c:12644 ops_exit_list net/core/net_namespace.c:206 [inline] ops_undo_list+0x525/0x990 net/core/net_namespace.c:253 cleanup_net+0x4c5/0x800 net/core/net_namespace.c:686 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev_instance_lock_key#3); lock(team->team_lock_key#17); lock(&dev_instance_lock_key#3); lock(team->team_lock_key#17); *** DEADLOCK *** 5 locks held by kworker/u8:19/9878: #0: ffff88801b2f6148 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3213 [inline] #0: ffff88801b2f6148 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0 kernel/workqueue.c:3321 #1: ffffc9000383fbc0 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3214 [inline] #1: ffffc9000383fbc0 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0 kernel/workqueue.c:3321 #2: ffffffff8f503350 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf7/0x800 net/core/net_namespace.c:662 #3: ffffffff8f50ff48 (rtnl_mutex){+.+.}-{4:4}, at: default_device_exit_batch+0xdc/0x890 net/core/dev.c:12630 #4: ffff88807ea06d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2756 [inline] #4: ffff88807ea06d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: unregister_netdevice_many_notify+0x5a1/0x2320 net/core/dev.c:12036 stack backtrace: CPU: 0 UID: 0 PID: 9878 Comm: kworker/u8:19 Not tainted 6.16.0-rc3-syzkaller-00044-g7595b66ae9de #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025 Workqueue: netns cleanup_net Call Trace: dump_stack_lvl+0x189/0x250 lib/dump_stack.c:120 print_circular_bug+0x2ee/0x310 kernel/locking/lockdep.c:2046 check_noncircular+0x134/0x160 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3168 [inline] check_prevs_add kernel/locking/lockdep.c:3287 [inline] validate_chain+0xb9b/0x2140 kernel/locking/lockdep.c:3911 __lock_acquire+0xab9/0xd20 kernel/locking/lockdep.c:5240 lock_acquire+0x120/0x360 kernel/locking/lockdep.c:5871 __mutex_lock_common kernel/locking/mutex.c:602 [inline] __mutex_lock+0x182/0xe80 kernel/locking/mutex.c:747 team_port_change_check drivers/net/team/team_core.c:2966 [inline] team_device_event+0x182/0xa20 drivers/net/team/team_core.c:2992 notifier_call_chain+0x1b6/0x3e0 kernel/notifier.c:85 call_netdevice_notifiers_extack net/core/dev.c:2268 [inline] call_netdevice_notifiers net/core/dev.c:2282 [inline] dev_close_many+0x29c/0x410 net/core/dev.c:1785 unregister_netdevice_many_notify+0x619/0x2320 net/core/dev.c:12039 unregister_netdevice_many net/core/dev.c:12140 [inline] default_device_exit_batch+0x819/0x890 net/core/dev.c:12644 ops_exit_list net/core/net_namespace.c:206 [inline] ops_undo_list+0x525/0x990 net/core/net_namespace.c:253 cleanup_net+0x4c5/0x800 net/core/net_namespace.c:686 process_one_work kernel/workqueue.c:3238 [inline] process_scheduled_works+0xae1/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x711/0x8a0 kernel/kthread.c:464 ret_from_fork+0x3fc/0x770 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 veth1_macvtap: left promiscuous mode veth0_macvtap: left promiscuous mode veth1_vlan: left promiscuous mode veth0_vlan: left promiscuous mode team0 (unregistering): Port device team_slave_1 removed team0 (unregistering): Port device C removed team0 (unregistering): Port device dummy0 removed