====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc7-syzkaller-00205-g586de92313fc #0 Not tainted ------------------------------------------------------ syz.1.1035/12085 is trying to acquire lock: ffff888079b00768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ffff888079b00768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_open+0x132/0x210 net/mac80211/iface.c:445 but task is already holding lock: ffff88805cee8e00 (team->team_lock_key){+.+.}-{4:4}, at: team_add_slave+0x9c/0x2190 drivers/net/team/team_core.c:1987 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (team->team_lock_key){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 team_set_mac_address+0x17f/0x290 drivers/net/team/team_core.c:1816 dev_set_mac_address+0x301/0x4a0 net/core/dev.c:9515 dev_set_mac_address_user+0x30/0x50 net/core/dev.c:9534 do_setlink.constprop.0+0x7bf/0x3f80 net/core/rtnetlink.c:3073 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1306/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] __sys_sendto+0x488/0x4f0 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __x64_sys_sendto+0xe0/0x1c0 net/socket.c:2190 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #2 (dev_addr_sem){++++}-{4:4}: down_read+0x9a/0x330 kernel/locking/rwsem.c:1524 address_show+0x23/0x2a0 net/core/net-sysfs.c:184 dev_attr_show+0x53/0xe0 drivers/base/core.c:2424 sysfs_kf_seq_show+0x23e/0x410 fs/sysfs/file.c:59 seq_read_iter+0x4f4/0x12b0 fs/seq_file.c:230 kernfs_fop_read_iter+0x414/0x580 fs/kernfs/file.c:279 new_sync_read fs/read_write.c:484 [inline] vfs_read+0x886/0xbf0 fs/read_write.c:565 ksys_read+0x12b/0x250 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (kn->active#19){++++}-{0:0}: kernfs_drain+0x48f/0x590 fs/kernfs/dir.c:500 __kernfs_remove+0x281/0x670 fs/kernfs/dir.c:1487 kernfs_remove_by_name_ns+0xb2/0x130 fs/kernfs/dir.c:1695 kernfs_remove_by_name include/linux/kernfs.h:625 [inline] remove_files+0x96/0x1c0 fs/sysfs/group.c:28 sysfs_remove_group+0x8b/0x180 fs/sysfs/group.c:322 sysfs_remove_groups fs/sysfs/group.c:346 [inline] sysfs_remove_groups+0x60/0xa0 fs/sysfs/group.c:338 device_remove_groups drivers/base/core.c:2820 [inline] device_remove_attrs+0x204/0x290 drivers/base/core.c:2956 device_del+0x38e/0x9f0 drivers/base/core.c:3854 unregister_netdevice_many_notify+0x13aa/0x1f30 net/core/dev.c:11923 unregister_netdevice_many net/core/dev.c:11951 [inline] unregister_netdevice_queue+0x307/0x3f0 net/core/dev.c:11821 unregister_netdevice include/linux/netdevice.h:3337 [inline] _cfg80211_unregister_wdev+0x64b/0x830 net/wireless/core.c:1255 ieee80211_remove_interfaces+0x34f/0x720 net/mac80211/iface.c:2306 ieee80211_unregister_hw+0x55/0x3a0 net/mac80211/main.c:1681 mac80211_hwsim_del_radio drivers/net/wireless/virtual/mac80211_hwsim.c:5664 [inline] remove_user_radios drivers/net/wireless/virtual/mac80211_hwsim.c:6464 [inline] mac80211_hwsim_netlink_notify+0x2ec/0x8e0 drivers/net/wireless/virtual/mac80211_hwsim.c:6478 notifier_call_chain+0xb7/0x410 kernel/notifier.c:85 blocking_notifier_call_chain kernel/notifier.c:380 [inline] blocking_notifier_call_chain+0x69/0xa0 kernel/notifier.c:368 netlink_release+0x1838/0x1fe0 net/netlink/af_netlink.c:764 __sock_release+0xb0/0x270 net/socket.c:647 sock_close+0x1c/0x30 net/socket.c:1398 __fput+0x3ff/0xb70 fs/file_table.c:464 __fput_sync+0xa1/0xc0 fs/file_table.c:550 __do_sys_close fs/open.c:1580 [inline] __se_sys_close fs/open.c:1565 [inline] __x64_sys_close+0x86/0x100 fs/open.c:1565 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&rdev->wiphy.mtx){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_open+0x132/0x210 net/mac80211/iface.c:445 __dev_open+0x2d4/0x540 net/core/dev.c:1635 dev_open net/core/dev.c:1671 [inline] dev_open+0xf4/0x160 net/core/dev.c:1664 team_port_add drivers/net/team/team_core.c:1229 [inline] team_add_slave+0xaf6/0x2190 drivers/net/team/team_core.c:1988 do_set_master+0x1bc/0x230 net/core/rtnetlink.c:2926 do_setlink.constprop.0+0xb5b/0x3f80 net/core/rtnetlink.c:3125 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1306/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] ____sys_sendmsg+0xaaf/0xc90 net/socket.c:2573 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2627 __sys_sendmsg+0x16e/0x220 net/socket.c:2659 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: &rdev->wiphy.mtx --> dev_addr_sem --> team->team_lock_key Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(team->team_lock_key); lock(dev_addr_sem); lock(team->team_lock_key); lock(&rdev->wiphy.mtx); *** DEADLOCK *** 2 locks held by syz.1.1035/12085: #0: ffffffff8fef85a8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8fef85a8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline] #0: ffffffff8fef85a8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0x5d9/0x1d60 net/core/rtnetlink.c:4021 #1: ffff88805cee8e00 (team->team_lock_key){+.+.}-{4:4}, at: team_add_slave+0x9c/0x2190 drivers/net/team/team_core.c:1987 stack backtrace: CPU: 1 UID: 0 PID: 12085 Comm: syz.1.1035 Not tainted 6.14.0-rc7-syzkaller-00205-g586de92313fc #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120 print_circular_bug+0x490/0x760 kernel/locking/lockdep.c:2076 check_noncircular+0x31a/0x400 kernel/locking/lockdep.c:2208 check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x249e/0x3c40 kernel/locking/lockdep.c:5228 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19b/0xb10 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_open+0x132/0x210 net/mac80211/iface.c:445 __dev_open+0x2d4/0x540 net/core/dev.c:1635 dev_open net/core/dev.c:1671 [inline] dev_open+0xf4/0x160 net/core/dev.c:1664 team_port_add drivers/net/team/team_core.c:1229 [inline] team_add_slave+0xaf6/0x2190 drivers/net/team/team_core.c:1988 do_set_master+0x1bc/0x230 net/core/rtnetlink.c:2926 do_setlink.constprop.0+0xb5b/0x3f80 net/core/rtnetlink.c:3125 rtnl_changelink net/core/rtnetlink.c:3733 [inline] __rtnl_newlink net/core/rtnetlink.c:3885 [inline] rtnl_newlink+0x1306/0x1d60 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x95b/0xea0 net/core/rtnetlink.c:6912 netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2533 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] ____sys_sendmsg+0xaaf/0xc90 net/socket.c:2573 ___sys_sendmsg+0x135/0x1e0 net/socket.c:2627 __sys_sendmsg+0x16e/0x220 net/socket.c:2659 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7fed18d169 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f7fee08c038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f7fed3a5fa0 RCX: 00007f7fed18d169 RDX: 0000000000000000 RSI: 0000200000000600 RDI: 0000000000000004 RBP: 00007f7fed20e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f7fed3a5fa0 R15: 00007fffb63b1a48 team0: Port device wlan1 added