hsr_slave_1: left promiscuous mode 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-syzkaller #0 Not tainted ------------------------------------------------------ kworker/u8:12/8752 is trying to acquire lock: ffff88807c2a4e00 (team->team_lock_key#5){+.+.}-{4:4}, at: team_port_change_check drivers/net/team/team_core.c:2966 [inline] ffff88807c2a4e00 (team->team_lock_key#5){+.+.}-{4:4}, at: team_device_event+0x182/0xa20 drivers/net/team/team_core.c:2992 but task is already holding lock: ffff888034de6d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2756 [inline] ffff888034de6d30 (&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+0x530/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+0x7cc/0xb70 net/core/rtnetlink.c:6944 netlink_rcv_skb+0x205/0x470 net/netlink/af_netlink.c:2552 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x75c/0x8e0 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x805/0xb30 net/netlink/af_netlink.c:1896 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#5){+.+.}-{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+0x1b3/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+0x522/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+0xade/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/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#5); lock(&dev_instance_lock_key#3); lock(team->team_lock_key#5); *** DEADLOCK *** 5 locks held by kworker/u8:12/8752: #0: ffff88801b2fb948 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3213 [inline] #0: ffff88801b2fb948 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x9b4/0x17b0 kernel/workqueue.c:3321 #1: ffffc900047e7bc0 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3214 [inline] #1: ffffc900047e7bc0 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x9ef/0x17b0 kernel/workqueue.c:3321 #2: ffffffff8f4fd310 (pernet_ops_rwsem){++++}-{4:4}, at: cleanup_net+0xf7/0x800 net/core/net_namespace.c:662 #3: ffffffff8f509f08 (rtnl_mutex){+.+.}-{4:4}, at: default_device_exit_batch+0xdc/0x890 net/core/dev.c:12630 #4: ffff888034de6d30 (&dev_instance_lock_key#3){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2756 [inline] #4: ffff888034de6d30 (&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: 8752 Comm: kworker/u8:12 Not tainted 6.16.0-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/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+0x1b3/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+0x522/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+0xade/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/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 team_slave_0 removed team0 (unregistering): Port device dummy0 removed IPVS: stop unused estimator thread 0... netdevsim netdevsim2 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim2 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim2 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim2 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim5 netdevsim3 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim5 netdevsim2 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim5 netdevsim1 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 netdevsim netdevsim5 netdevsim0 (unregistering): unset [1, 0] type 2 family 0 port 6081 - 0 bridge0: port 3(batadv0) entered disabled state bridge_slave_1: left allmulticast mode bridge_slave_1: left promiscuous mode bridge0: port 2(bridge_slave_1) entered disabled state bridge_slave_0: left allmulticast mode bridge_slave_0: left promiscuous mode bridge0: port 1(bridge_slave_0) entered disabled state bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond0 (unregistering): (slave bond_slave_1): Releasing backup interface bond0 (unregistering): Released all slaves bond0 (unregistering): (slave bond_slave_0): Releasing backup interface bond0 (unregistering): (slave bond_slave_1): Releasing backup interface bond0 (unregistering): (slave wlan1): Releasing backup interface bond0 (unregistering): Released all slaves bond1 (unregistering): Released all slaves hsr_slave_0: left promiscuous mode hsr_slave_1: left promiscuous mode batman_adv: batadv0: Interface deactivated: batadv_slave_0 batman_adv: batadv0: Removing interface: batadv_slave_0 hsr_slave_0: left promiscuous mode hsr_slave_1: left promiscuous mode 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 veth1_macvtap: left promiscuous mode veth0_macvtap: left promiscuous mode veth1_vlan: left allmulticast mode veth1_vlan: left promiscuous mode veth0_vlan: left promiscuous mode veth1_macvtap: left promiscuous mode veth0_macvtap: left promiscuous mode veth1_vlan: left allmulticast mode veth1_vlan: left promiscuous mode veth0_vlan: left promiscuous mode team0 (unregistering): Port device team_slave_1 removed team0 (unregistering): Port device team_slave_0 removed team0 (unregistering): Port device team_slave_1 removed team0 (unregistering): Port device team_slave_0 removed IPVS: stop unused estimator thread 0... IPVS: stop unused estimator thread 0... ------------[ cut here ]------------ WARNING: CPU: 0 PID: 8752 at net/xfrm/xfrm_state.c:3284 xfrm_state_fini+0x270/0x2f0 net/xfrm/xfrm_state.c:3284 Modules linked in: CPU: 0 UID: 0 PID: 8752 Comm: kworker/u8:12 Not tainted 6.16.0-syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/12/2025 Workqueue: netns cleanup_net RIP: 0010:xfrm_state_fini+0x270/0x2f0 net/xfrm/xfrm_state.c:3284 Code: c1 e8 03 42 80 3c 28 00 74 08 48 89 df e8 d8 e3 10 f8 48 8b 3b 5b 41 5c 41 5d 41 5e 41 5f 5d e9 36 f4 f1 f7 e8 81 fc b0 f7 90 <0f> 0b 90 e9 fd fd ff ff e8 73 fc b0 f7 90 0f 0b 90 e9 60 fe ff ff RSP: 0018:ffffc900047e7898 EFLAGS: 00010293 RAX: ffffffff8a0f293f RBX: ffff888068d14100 RCX: ffff888027069e00 RDX: 0000000000000000 RSI: ffffffff8be1ba20 RDI: ffff888027069e00 RBP: ffffc900047e79b0 R08: ffffffff8fa0b3f7 R09: 1ffffffff1f4167e R10: dffffc0000000000 R11: fffffbfff1f4167f R12: ffffffff8f6054a0 R13: 1ffff920008fcf40 R14: ffff888068d155c0 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff888125c57000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00005569e2be2fb0 CR3: 000000000df38000 CR4: 00000000003526f0 Call Trace: xfrm_net_exit+0x2d/0x70 net/xfrm/xfrm_policy.c:4348 ops_exit_list net/core/net_namespace.c:200 [inline] ops_undo_list+0x497/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+0xade/0x17b0 kernel/workqueue.c:3321 worker_thread+0x8a0/0xda0 kernel/workqueue.c:3402 kthread+0x70e/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