syzbot


possible deadlock in team_del_slave

Status: upstream: reported on 2025/06/16 19:00
Reported-by: syzbot+a9b9c86ad5a5cd402544@syzkaller.appspotmail.com
First crash: 1d13h, last: 6h55m
Similar bugs (6)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in team_del_slave net 1 1368d 1366d 0/28 auto-closed as invalid on 2022/01/16 14:16
upstream possible deadlock in team_del_slave (2) net 35 705d 870d 0/28 auto-obsoleted due to no activity on 2023/09/28 12:50
linux-6.1 possible deadlock in team_del_slave origin:upstream missing-backport C inconclusive 61 28d 447d 0/3 upstream: reported C repro on 2024/03/27 10:53
linux-5.15 possible deadlock in team_del_slave (2) origin:lts-only C 69 5d03h 522d 0/3 upstream: reported C repro on 2024/01/12 21:46
upstream possible deadlock in team_del_slave (3) net C error 355005 now 417d 0/28 upstream: reported C repro on 2024/04/26 11:59
linux-5.15 possible deadlock in team_del_slave 1 795d 795d 0/3 auto-obsoleted due to no activity on 2023/08/13 07:03

Sample crash report:
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): Released all slaves
======================================================
WARNING: possible circular locking dependency detected
6.6.93-syzkaller #0 Not tainted
------------------------------------------------------
kworker/u4:6/1123 is trying to acquire lock:
ffff888031850d00 (team->team_lock_key#9){+.+.}-{3:3}, at: team_del_slave+0x32/0x1c0 drivers/net/team/team.c:1997

but task is already holding lock:
ffff88806b430768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5777 [inline]
ffff88806b430768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: ieee80211_remove_interfaces+0x292/0x680 net/mac80211/iface.c:2332

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+0x129/0xcc0 kernel/locking/mutex.c:747
       wiphy_lock include/net/cfg80211.h:5777 [inline]
       ieee80211_open+0x144/0x200 net/mac80211/iface.c:458
       __dev_open+0x2bc/0x430 net/core/dev.c:1506
       dev_open+0xab/0x170 net/core/dev.c:1542
       team_port_add drivers/net/team/team.c:1223 [inline]
       team_add_slave+0xae7/0x2660 drivers/net/team/team.c:1983
       do_set_master net/core/rtnetlink.c:2706 [inline]
       do_setlink+0xe14/0x3fb0 net/core/rtnetlink.c:2912
       __rtnl_newlink net/core/rtnetlink.c:3703 [inline]
       rtnl_newlink+0x175b/0x2020 net/core/rtnetlink.c:3750
       rtnetlink_rcv_msg+0x7c7/0xf10 net/core/rtnetlink.c:6475
       netlink_rcv_skb+0x216/0x480 net/netlink/af_netlink.c:2537
       netlink_unicast_kernel net/netlink/af_netlink.c:1323 [inline]
       netlink_unicast+0x750/0x8c0 net/netlink/af_netlink.c:1349
       netlink_sendmsg+0x8c1/0xbe0 net/netlink/af_netlink.c:1891
       sock_sendmsg_nosec net/socket.c:730 [inline]
       __sock_sendmsg net/socket.c:745 [inline]
       ____sys_sendmsg+0x5bf/0x950 net/socket.c:2595
       ___sys_sendmsg+0x220/0x290 net/socket.c:2649
       __sys_sendmsg net/socket.c:2678 [inline]
       __do_sys_sendmsg net/socket.c:2687 [inline]
       __se_sys_sendmsg+0x1a5/0x270 net/socket.c:2685
       do_syscall_x64 arch/x86/entry/common.c:51 [inline]
       do_syscall_64+0x55/0xb0 arch/x86/entry/common.c:81
       entry_SYSCALL_64_after_hwframe+0x68/0xd2

-> #0 (team->team_lock_key#9){+.+.}-{3:3}:
       check_prev_add kernel/locking/lockdep.c:3134 [inline]
       check_prevs_add kernel/locking/lockdep.c:3253 [inline]
       validate_chain kernel/locking/lockdep.c:3869 [inline]
       __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137
       lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754
       __mutex_lock_common kernel/locking/mutex.c:603 [inline]
       __mutex_lock+0x129/0xcc0 kernel/locking/mutex.c:747
       team_del_slave+0x32/0x1c0 drivers/net/team/team.c:1997
       team_device_event+0x28d/0xa20 drivers/net/team/team.c:3041
       notifier_call_chain+0x197/0x390 kernel/notifier.c:93
       call_netdevice_notifiers_extack net/core/dev.c:2064 [inline]
       call_netdevice_notifiers net/core/dev.c:2078 [inline]
       unregister_netdevice_many_notify+0xf36/0x1810 net/core/dev.c:11074
       unregister_netdevice_many net/core/dev.c:11130 [inline]
       unregister_netdevice_queue+0x324/0x360 net/core/dev.c:11010
       unregister_netdevice include/linux/netdevice.h:3136 [inline]
       _cfg80211_unregister_wdev+0x16b/0x580 net/wireless/core.c:1215
       ieee80211_remove_interfaces+0x496/0x680 net/mac80211/iface.c:2351
       ieee80211_unregister_hw+0x5d/0x2a0 net/mac80211/main.c:1512
       mac80211_hwsim_del_radio+0x274/0x450 drivers/net/wireless/virtual/mac80211_hwsim.c:5408
       hwsim_exit_net+0x585/0x640 drivers/net/wireless/virtual/mac80211_hwsim.c:6285
       ops_exit_list net/core/net_namespace.c:173 [inline]
       cleanup_net+0x6f4/0xb90 net/core/net_namespace.c:652
       process_one_work kernel/workqueue.c:2634 [inline]
       process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
       worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
       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#9);
                               lock(&rdev->wiphy.mtx);
  lock(team->team_lock_key#9);

 *** DEADLOCK ***

5 locks held by kworker/u4:6/1123:
 #0: ffff888017873938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2609 [inline]
 #0: ffff888017873938 ((wq_completion)netns){+.+.}-{0:0}, at: process_scheduled_works+0x957/0x15b0 kernel/workqueue.c:2711
 #1: ffffc900043afd00 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:2609 [inline]
 #1: ffffc900043afd00 (net_cleanup_work){+.+.}-{0:0}, at: process_scheduled_works+0x957/0x15b0 kernel/workqueue.c:2711
 #2: ffffffff8dfa1c90 (pernet_ops_rwsem){++++}-{3:3}, at: cleanup_net+0x136/0xb90 net/core/net_namespace.c:606
 #3: ffffffff8dfaea88 (rtnl_mutex){+.+.}-{3:3}, at: ieee80211_unregister_hw+0x55/0x2a0 net/mac80211/main.c:1505
 #4: ffff88806b430768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5777 [inline]
 #4: ffff88806b430768 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: ieee80211_remove_interfaces+0x292/0x680 net/mac80211/iface.c:2332

stack backtrace:
CPU: 1 PID: 1123 Comm: kworker/u4:6 Not tainted 6.6.93-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Workqueue: netns cleanup_net
Call Trace:
 <TASK>
 dump_stack_lvl+0x16c/0x230 lib/dump_stack.c:106
 check_noncircular+0x2bd/0x3c0 kernel/locking/lockdep.c:2187
 check_prev_add kernel/locking/lockdep.c:3134 [inline]
 check_prevs_add kernel/locking/lockdep.c:3253 [inline]
 validate_chain kernel/locking/lockdep.c:3869 [inline]
 __lock_acquire+0x2ddb/0x7c80 kernel/locking/lockdep.c:5137
 lock_acquire+0x197/0x410 kernel/locking/lockdep.c:5754
 __mutex_lock_common kernel/locking/mutex.c:603 [inline]
 __mutex_lock+0x129/0xcc0 kernel/locking/mutex.c:747
 team_del_slave+0x32/0x1c0 drivers/net/team/team.c:1997
 team_device_event+0x28d/0xa20 drivers/net/team/team.c:3041
 notifier_call_chain+0x197/0x390 kernel/notifier.c:93
 call_netdevice_notifiers_extack net/core/dev.c:2064 [inline]
 call_netdevice_notifiers net/core/dev.c:2078 [inline]
 unregister_netdevice_many_notify+0xf36/0x1810 net/core/dev.c:11074
 unregister_netdevice_many net/core/dev.c:11130 [inline]
 unregister_netdevice_queue+0x324/0x360 net/core/dev.c:11010
 unregister_netdevice include/linux/netdevice.h:3136 [inline]
 _cfg80211_unregister_wdev+0x16b/0x580 net/wireless/core.c:1215
 ieee80211_remove_interfaces+0x496/0x680 net/mac80211/iface.c:2351
 ieee80211_unregister_hw+0x5d/0x2a0 net/mac80211/main.c:1512
 mac80211_hwsim_del_radio+0x274/0x450 drivers/net/wireless/virtual/mac80211_hwsim.c:5408
 hwsim_exit_net+0x585/0x640 drivers/net/wireless/virtual/mac80211_hwsim.c:6285
 ops_exit_list net/core/net_namespace.c:173 [inline]
 cleanup_net+0x6f4/0xb90 net/core/net_namespace.c:652
 process_one_work kernel/workqueue.c:2634 [inline]
 process_scheduled_works+0xa45/0x15b0 kernel/workqueue.c:2711
 worker_thread+0xa55/0xfc0 kernel/workqueue.c:2792
 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
 </TASK>
team0: Port device wlan1 removed
hsr_slave_0: left promiscuous mode
hsr_slave_1: left promiscuous mode
batman_adv: batadv0: Removing interface: batadv_slave_0
batman_adv: batadv0: Removing interface: batadv_slave_1
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
bond4 (unregistering): Released all slaves
bond3 (unregistering): Released all slaves
bond1 (unregistering): (slave bond2): Releasing backup interface
bond2 (unregistering): Released all slaves
bond1 (unregistering): Released all slaves
team0 (unregistering): Port device team_slave_1 removed
team0 (unregistering): Port device team_slave_0 removed
bond0 (unregistering): (slave bond_slave_1): Releasing backup interface
bond0 (unregistering): (slave bond_slave_0): Releasing backup interface
bond0 (unregistering): Released all slaves

Crashes (26):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2025/06/18 01:07 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in team_del_slave
2025/06/18 01:06 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in team_del_slave
2025/06/18 00:33 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 23:57 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 23:52 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 22:52 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in team_del_slave
2025/06/17 22:52 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in team_del_slave
2025/06/17 22:52 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in team_del_slave
2025/06/17 22:52 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in team_del_slave
2025/06/17 22:51 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan possible deadlock in team_del_slave
2025/06/17 22:43 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 22:42 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 22:25 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 21:29 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 19:40 linux-6.6.y c2603c511feb e77fae15 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 04:33 linux-6.6.y c2603c511feb cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 04:32 linux-6.6.y c2603c511feb cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 04:01 linux-6.6.y c2603c511feb cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 04:01 linux-6.6.y c2603c511feb cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 03:17 linux-6.6.y c2603c511feb cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 03:16 linux-6.6.y c2603c511feb cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 02:27 linux-6.6.y c2603c511feb cfebc887 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 00:23 linux-6.6.y c2603c511feb d1716036 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 00:07 linux-6.6.y c2603c511feb d1716036 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/17 00:02 linux-6.6.y c2603c511feb d1716036 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
2025/06/16 18:59 linux-6.6.y c2603c511feb d1716036 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-6-6-kasan-perf possible deadlock in team_del_slave
* Struck through repros no longer work on HEAD.