====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:16/19247 is trying to acquire lock: ffff88807bce4d80 (team->team_lock_key #18){+.+.}-{3:3}, at: team_del_slave+0x31/0x1b0 drivers/net/team/team_core.c:2004 but task is already holding lock: ffff888050bd0768 (&rdev->wiphy.mtx ){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5777 [inline] ){+.+.}-{3:3}, at: ieee80211_remove_interfaces+0x2bd/0x690 net/mac80211/iface.c:2379 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 ( &rdev->wiphy.mtx){+.+.}-{3:3} : __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747 wiphy_lock include/net/cfg80211.h:5777 [inline] ieee80211_open+0x144/0x200 net/mac80211/iface.c:470 __dev_open+0x2cb/0x430 net/core/dev.c:1519 dev_open+0xab/0x190 net/core/dev.c:1555 team_port_add drivers/net/team/team_core.c:1225 [inline] team_add_slave+0x703/0x28a0 drivers/net/team/team_core.c:1990 do_set_master net/core/rtnetlink.c:2718 [inline] do_setlink+0xcde/0x3f40 net/core/rtnetlink.c:2924 __rtnl_newlink net/core/rtnetlink.c:3715 [inline] rtnl_newlink+0x1848/0x2170 net/core/rtnetlink.c:3762 rtnetlink_rcv_msg+0x843/0xf90 net/core/rtnetlink.c:6484 netlink_rcv_skb+0x235/0x4c0 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1320 [inline] netlink_unicast+0x7b1/0x930 net/netlink/af_netlink.c:1346 netlink_sendmsg+0x8d0/0xbf0 net/netlink/af_netlink.c:1899 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg net/socket.c:745 [inline] ____sys_sendmsg+0x61b/0x980 net/socket.c:2595 ___sys_sendmsg+0x2a6/0x360 net/socket.c:2649 __sys_sendmsg net/socket.c:2678 [inline] __do_sys_sendmsg net/socket.c:2687 [inline] __se_sys_sendmsg+0x1d0/0x2c0 net/socket.c:2685 do_syscall_x64 arch/x86/entry/common.c:46 [inline] do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:76 entry_SYSCALL_64_after_hwframe+0x68/0xd2 -> #0 (team->team_lock_key#18){+.+.}-{3:3}: check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747 team_del_slave+0x31/0x1b0 drivers/net/team/team_core.c:2004 team_device_event+0x297/0xa30 drivers/net/team/team_core.c:3110 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2077 [inline] call_netdevice_notifiers net/core/dev.c:2091 [inline] unregister_netdevice_many_notify+0x1037/0x1910 net/core/dev.c:11181 unregister_netdevice_many net/core/dev.c:11237 [inline] unregister_netdevice_queue+0x2e9/0x330 net/core/dev.c:11117 unregister_netdevice include/linux/netdevice.h:3194 [inline] _cfg80211_unregister_wdev+0x16d/0x580 net/wireless/core.c:1217 ieee80211_remove_interfaces+0x4b3/0x690 net/mac80211/iface.c:2398 ieee80211_unregister_hw+0x5d/0x2a0 net/mac80211/main.c:1522 mac80211_hwsim_del_radio+0x289/0x480 drivers/net/wireless/virtual/mac80211_hwsim.c:5418 hwsim_exit_net+0x58d/0x650 drivers/net/wireless/virtual/mac80211_hwsim.c:6300 ops_exit_list net/core/net_namespace.c:173 [inline] cleanup_net+0x6f7/0xb00 net/core/net_namespace.c:656 process_one_work kernel/workqueue.c:2657 [inline] process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734 worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rdev->wiphy.mtx); lock(team->team_lock_key#18); lock(&rdev->wiphy.mtx); lock(team->team_lock_key#18); *** DEADLOCK *** 5 locks held by kworker/u4:16/19247: #0: ffff88801ae5d138 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2632 [inline] #0: ffff88801ae5d138 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x975/0x1600 kernel/workqueue.c:2734 #1: ffffc90003607d00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2632 [inline] #1: ffffc90003607d00 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x975/0x1600 kernel/workqueue.c:2734 #2: ffffffff8f1c5810 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x140/0xb00 net/core/net_namespace.c:610 #3: ffffffff8f1d2888 (rtnl_mutex){+.+.}-{3:3}, at: ieee80211_unregister_hw+0x55/0x2a0 net/mac80211/main.c:1515 #4: ffff888050bd0768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5777 [inline] #4: ffff888050bd0768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: ieee80211_remove_interfaces+0x2bd/0x690 net/mac80211/iface.c:2379 stack backtrace: CPU: 0 PID: 19247 Comm: kworker/u4:16 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/16/2026 Workqueue: netns cleanup_net Call Trace: dump_stack_lvl+0x18c/0x250 lib/dump_stack.c:106 check_noncircular+0x2fc/0x400 kernel/locking/lockdep.c:2215 check_prev_add kernel/locking/lockdep.c:3162 [inline] check_prevs_add kernel/locking/lockdep.c:3281 [inline] validate_chain kernel/locking/lockdep.c:3897 [inline] __lock_acquire+0x3a07/0x7eb0 kernel/locking/lockdep.c:5171 lock_acquire+0x19e/0x420 kernel/locking/lockdep.c:5790 __mutex_lock_common kernel/locking/mutex.c:603 [inline] __mutex_lock+0x135/0xc80 kernel/locking/mutex.c:747 team_del_slave+0x31/0x1b0 drivers/net/team/team_core.c:2004 team_device_event+0x297/0xa30 drivers/net/team/team_core.c:3110 notifier_call_chain+0x18f/0x380 kernel/notifier.c:93 call_netdevice_notifiers_extack net/core/dev.c:2077 [inline] call_netdevice_notifiers net/core/dev.c:2091 [inline] unregister_netdevice_many_notify+0x1037/0x1910 net/core/dev.c:11181 unregister_netdevice_many net/core/dev.c:11237 [inline] unregister_netdevice_queue+0x2e9/0x330 net/core/dev.c:11117 unregister_netdevice include/linux/netdevice.h:3194 [inline] _cfg80211_unregister_wdev+0x16d/0x580 net/wireless/core.c:1217 ieee80211_remove_interfaces+0x4b3/0x690 net/mac80211/iface.c:2398 ieee80211_unregister_hw+0x5d/0x2a0 net/mac80211/main.c:1522 mac80211_hwsim_del_radio+0x289/0x480 drivers/net/wireless/virtual/mac80211_hwsim.c:5418 hwsim_exit_net+0x58d/0x650 drivers/net/wireless/virtual/mac80211_hwsim.c:6300 ops_exit_list net/core/net_namespace.c:173 [inline] cleanup_net+0x6f7/0xb00 net/core/net_namespace.c:656 process_one_work kernel/workqueue.c:2657 [inline] process_scheduled_works+0xa60/0x1600 kernel/workqueue.c:2734 worker_thread+0xa5e/0xfe0 kernel/workqueue.c:2815 kthread+0x2fa/0x390 kernel/kthread.c:388 ret_from_fork+0x48/0x80 arch/x86/kernel/process.c:152 ret_from_fork_asm+0x11/0x20 arch/x86/entry/entry_64.S:293 mac80211_hwsim hwsim39 wlan1 (unregistering): bond_netdev_event received NETDEV_CHANGELOWERSTATE net wlan1: siw: event 28 mac80211_hwsim hwsim39 wlan1 (unregistering): bond_netdev_event received NETDEV_PRECHANGEUPPER net wlan1: siw: event 27 Remove adjacency: dev wlan1 adj_dev team0 ref_nr 1 kernfs master: removing kernfs upper_team0: removing adjacency: dev_put for team0, because link removed from wlan1 to team0 Remove adjacency: dev team0 adj_dev wlan1 ref_nr 1 kernfs lower_wlan1: removing adjacency: dev_put for wlan1, because link removed from team0 to wlan1 mac80211_hwsim hwsim39 wlan1 (unregistering): bond_netdev_event received NETDEV_CHANGEUPPER net wlan1: siw: event 22 mac80211_hwsim hwsim39 wlan1 (unregistering): bond_netdev_event received NETDEV_PRE_CHANGEADDR net wlan1: siw: event 9 mac80211_hwsim hwsim39 wlan1 (unregistering): bond_netdev_event received NETDEV_CHANGEADDR net wlan1: siw: event 8 team0: Port device wlan1 removed team0: bond_netdev_event received NETDEV_FEAT_CHANGE net team0: siw: event 12 net wlan1: siw: event 6 mac80211_hwsim hwsim39 wlan1 (unregistering): bond_netdev_event received NETDEV_PRE_UNINIT net wlan1: siw: event 18 kobject: 'rx-0' (ffff88805e660650): kobject_cleanup, parent ffff88801aea3650 kobject: 'rx-0' (ffff88805e660650): auto cleanup kobject_del kernfs rps_cpus: removing kernfs rps_flow_cnt: removing kobject: 'rx-0' (ffff88805e660650): auto cleanup 'remove' event kobject: 'rx-0' (ffff88805e660650): kobject_uevent_env kobject: 'rx-0' (ffff88805e660650): kobject_uevent_env: uevent_suppress caused the event to drop! kernfs rx-0: removing kobject: 'rx-0' (ffff88805e660650): calling ktype release kobject: 'rx-0': free name kernfs limit: removing kernfs limit_max: removing kernfs limit_min: removing kernfs hold_time: removing kernfs inflight: removing kernfs byte_queue_limits: removing kobject: 'tx-0' (ffff8880297b0820): kobject_cleanup, parent ffff88801aea3650 kobject: 'tx-0' (ffff8880297b0820): auto cleanup kobject_del kernfs tx_timeout: removing kernfs traffic_class: removing kernfs xps_cpus: removing kernfs xps_rxqs: removing kernfs tx_maxrate: removing kobject: 'tx-0' (ffff8880297b0820): auto cleanup 'remove' event kobject: 'tx-0' (ffff8880297b0820): kobject_uevent_env kobject: 'tx-0' (ffff8880297b0820): kobject_uevent_env: uevent_suppress caused the event to drop! kernfs tx-0: removing kobject: 'tx-0' (ffff8880297b0820): calling ktype release kobject: 'tx-0': free name kernfs queues: removing kobject: 'queues' (ffff88801aea3650): kobject_cleanup, parent 0000000000000000 kobject: 'queues' (ffff88801aea3650): calling ktype release kobject: 'queues' (ffff88801aea3650): kset_release kobject: 'queues': free name kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs device: removing kernfs subsystem: removing kernfs wlan1: removing kernfs uevent: removing kernfs rx_packets: removing kernfs tx_packets: removing kernfs rx_bytes: removing kernfs tx_bytes: removing kernfs rx_errors: removing kernfs tx_errors: removing kernfs rx_dropped: removing kernfs tx_dropped: removing kernfs multicast: removing kernfs collisions: removing kernfs rx_length_errors: removing kernfs rx_over_errors: removing kernfs rx_crc_errors: removing kernfs rx_frame_errors: removing kernfs rx_fifo_errors: removing kernfs rx_missed_errors: removing kernfs tx_aborted_errors: removing kernfs tx_carrier_errors: removing kernfs tx_fifo_errors: removing kernfs tx_heartbeat_errors: removing kernfs tx_window_errors: removing kernfs rx_compressed: removing kernfs tx_compressed: removing kernfs rx_nohandler: removing kernfs statistics: removing kernfs wireless: removing kernfs netdev_group: removing kernfs type: removing kernfs dev_id: removing kernfs dev_port: removing kernfs iflink: removing kernfs ifindex: removing kernfs name_assign_type: removing kernfs addr_assign_type: removing kernfs addr_len: removing kernfs link_mode: removing kernfs address: removing kernfs broadcast: removing kernfs speed: removing kernfs duplex: removing kernfs dormant: removing kernfs testing: removing kernfs operstate: removing kernfs carrier_changes: removing kernfs ifalias: removing kernfs carrier: removing kernfs mtu: removing kernfs flags: removing kernfs tx_queue_len: removing kernfs gro_flush_timeout: removing kernfs napi_defer_hard_irqs: removing kernfs phys_port_id: removing kernfs phys_port_name: removing kernfs phys_switch_id: removing kernfs proto_down: removing kernfs carrier_up_count: removing kernfs carrier_down_count: removing kernfs threaded: removing PM: Removing info for No Bus:wlan1 kobject: 'wlan1' (ffff88807b8906a8): kobject_uevent_env kobject: 'wlan1' (ffff88807b8906a8): kobject_uevent_env: uevent_suppress caused the event to drop! kernfs wlan1: removing kernfs net: removing kobject: 'net' (ffff88801fb0f680): kobject_cleanup, parent 0000000000000000 kobject: 'net' (ffff88801fb0f680): calling ktype release kobject: 'net': free name kobject: 'wlan1' (ffff88807b8906a8): kobject_cleanup, parent 0000000000000000 kobject: 'wlan1' (ffff88807b8906a8): calling ktype release kobject: 'wlan1': free name kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs device: removing kernfs subsystem: removing kernfs rfkill65: removing kernfs uevent: removing kernfs name: removing kernfs type: removing kernfs index: removing kernfs persistent: removing kernfs state: removing kernfs soft: removing kernfs hard: removing kernfs hard_block_reasons: removing PM: Removing info for No Bus:rfkill65 kobject: 'rfkill65' (ffff88806b3b0110): kobject_uevent_env kobject: 'rfkill65' (ffff88806b3b0110): fill_kobj_path: path = '/devices/virtual/mac80211_hwsim/hwsim39/ieee80211/phy40/rfkill65' kernfs rfkill65: removing kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs device: removing kernfs subsystem: removing kernfs phy40: removing kernfs uevent: removing kernfs index: removing kernfs macaddress: removing kernfs address_mask: removing kernfs addresses: removing kernfs name: removing PM: Removing info for No Bus:phy40 kobject: 'phy40' (ffff888050bd08e8): kobject_uevent_env kobject: 'phy40' (ffff888050bd08e8): fill_kobj_path: path = '/devices/virtual/mac80211_hwsim/hwsim39/ieee80211/phy40' kernfs phy40: removing kernfs ieee80211: removing kobject: 'ieee80211' (ffff88801fb0fc80): kobject_cleanup, parent 0000000000000000 kobject: 'ieee80211' (ffff88801fb0fc80): calling ktype release kobject: 'ieee80211': free name kernfs hwsim39: removing kernfs driver: removing kobject: 'hwsim39' (ffff88806b3b6000): kobject_uevent_env kobject: 'hwsim39' (ffff88806b3b6000): fill_kobj_path: path = '/devices/virtual/mac80211_hwsim/hwsim39' device: 'hwsim39': device_unregister kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs subsystem: removing kernfs hwsim39: removing kernfs uevent: removing PM: Removing info for No Bus:hwsim39 kobject: 'hwsim39' (ffff88806b3b6000): kobject_uevent_env kobject: 'hwsim39' (ffff88806b3b6000): fill_kobj_path: path = '/devices/virtual/mac80211_hwsim/hwsim39' kernfs hwsim39: removing kobject: 'hwsim39' (ffff88806b3b6000): kobject_cleanup, parent 0000000000000000 kobject: 'hwsim39' (ffff88806b3b6000): calling ktype release device: 'hwsim39': device_create_release kobject: 'hwsim39': free name kobject: 'phy40' (ffff888050bd08e8): kobject_cleanup, parent 0000000000000000 kobject: 'phy40' (ffff888050bd08e8): calling ktype release kobject: 'rfkill65' (ffff88806b3b0110): kobject_cleanup, parent 0000000000000000 kobject: 'rfkill65' (ffff88806b3b0110): calling ktype release kobject: 'rfkill65': free name kobject: 'phy40': free name ieee80211 phy38: mac80211_hwsim_link_info_changed(changed=0x400000 vif->addr=08:02:11:00:00:00, link id 0)