====================================================== WARNING: possible circular locking dependency detected 6.14.0-syzkaller #0 Not tainted ------------------------------------------------------ syz.6.5294/25779 is trying to acquire lock: ffff888027a48768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ffff888027a48768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_change_mac+0xc6/0x1160 net/mac80211/iface.c:307 but task is already holding lock: ffffffff8febb330 (dev_addr_sem){++++}-{4:4}, at: dev_set_mac_address_user+0x23/0x50 net/core/dev.c:9533 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (dev_addr_sem){++++}-{4:4}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 down_read+0xb1/0xa40 kernel/locking/rwsem.c:1524 address_show+0x25/0x250 net/core/net-sysfs.c:184 dev_attr_show+0x55/0xc0 drivers/base/core.c:2424 sysfs_kf_seq_show+0x331/0x4c0 fs/sysfs/file.c:59 seq_read_iter+0x43f/0xd70 fs/seq_file.c:230 new_sync_read fs/read_write.c:484 [inline] vfs_read+0x975/0xb40 fs/read_write.c:565 ksys_read+0x18f/0x2b0 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (kn->active#29){++++}-{0:0}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 kernfs_drain+0x31c/0x6d0 fs/kernfs/dir.c:500 __kernfs_remove+0x400/0x870 fs/kernfs/dir.c:1487 kernfs_remove_by_name_ns+0xdc/0x160 fs/kernfs/dir.c:1695 kernfs_remove_by_name include/linux/kernfs.h:625 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0xfe/0x2c0 fs/sysfs/group.c:322 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:346 device_remove_groups drivers/base/core.c:2820 [inline] device_remove_attrs+0x23a/0x290 drivers/base/core.c:2956 device_del+0x572/0x9b0 drivers/base/core.c:3854 unregister_netdevice_many_notify+0x19b4/0x1f10 net/core/dev.c:11923 unregister_netdevice_many net/core/dev.c:11951 [inline] unregister_netdevice_queue+0x303/0x370 net/core/dev.c:11821 unregister_netdevice include/linux/netdevice.h:3337 [inline] _cfg80211_unregister_wdev+0x163/0x590 net/wireless/core.c:1255 ieee80211_remove_interfaces+0x4ef/0x700 net/mac80211/iface.c:2306 ieee80211_unregister_hw+0x5d/0x2c0 net/mac80211/main.c:1681 mac80211_hwsim_del_radio+0x2c4/0x4c0 drivers/net/wireless/virtual/mac80211_hwsim.c:5664 remove_user_radios drivers/net/wireless/virtual/mac80211_hwsim.c:6464 [inline] mac80211_hwsim_netlink_notify+0x5de/0x930 drivers/net/wireless/virtual/mac80211_hwsim.c:6478 notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85 blocking_notifier_call_chain+0x69/0x90 kernel/notifier.c:380 netlink_release+0x11ce/0x1b20 net/netlink/af_netlink.c:764 __sock_release net/socket.c:647 [inline] sock_close+0xbc/0x240 net/socket.c:1398 __fput+0x3e9/0x9f0 fs/file_table.c:464 __do_sys_close fs/open.c:1580 [inline] __se_sys_close fs/open.c:1565 [inline] __x64_sys_close+0x7f/0x110 fs/open.c:1565 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 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+0x18ef/0x5920 kernel/locking/lockdep.c:3906 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_change_mac+0xc6/0x1160 net/mac80211/iface.c:307 dev_set_mac_address+0x327/0x510 net/core/dev.c:9515 dev_set_mac_address_user+0x31/0x50 net/core/dev.c:9534 dev_ifsioc+0xbd3/0xe70 net/core/dev_ioctl.c:575 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:826 sock_do_ioctl+0x240/0x460 net/socket.c:1213 sock_ioctl+0x626/0x8e0 net/socket.c:1318 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 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 --> kn->active#29 --> dev_addr_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(dev_addr_sem); lock(kn->active#29); lock(dev_addr_sem); lock(&rdev->wiphy.mtx); *** DEADLOCK *** 2 locks held by syz.6.5294/25779: #0: ffffffff8fec3c48 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:129 [inline] #0: ffffffff8fec3c48 (rtnl_mutex){+.+.}-{4:4}, at: dev_ioctl+0x706/0x1340 net/core/dev_ioctl.c:825 #1: ffffffff8febb330 (dev_addr_sem){++++}-{4:4}, at: dev_set_mac_address_user+0x23/0x50 net/core/dev.c:9533 stack backtrace: CPU: 1 UID: 0 PID: 25779 Comm: syz.6.5294 Not tainted 6.14.0-syzkaller #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+0x241/0x360 lib/dump_stack.c:120 print_circular_bug+0x13a/0x1b0 kernel/locking/lockdep.c:2076 check_noncircular+0x36a/0x4a0 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+0x18ef/0x5920 kernel/locking/lockdep.c:3906 __lock_acquire+0x1397/0x2100 kernel/locking/lockdep.c:5228 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x19c/0x1010 kernel/locking/mutex.c:730 class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ieee80211_change_mac+0xc6/0x1160 net/mac80211/iface.c:307 dev_set_mac_address+0x327/0x510 net/core/dev.c:9515 dev_set_mac_address_user+0x31/0x50 net/core/dev.c:9534 dev_ifsioc+0xbd3/0xe70 net/core/dev_ioctl.c:575 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:826 sock_do_ioctl+0x240/0x460 net/socket.c:1213 sock_ioctl+0x626/0x8e0 net/socket.c:1318 vfs_ioctl fs/ioctl.c:51 [inline] __do_sys_ioctl fs/ioctl.c:906 [inline] __se_sys_ioctl+0xf5/0x170 fs/ioctl.c:892 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f1106b8d169 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:00007f110797a038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f1106da5fa0 RCX: 00007f1106b8d169 RDX: 00002000000000c0 RSI: 0000000000008924 RDI: 0000000000000004 RBP: 00007f1106c0e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f1106da5fa0 R15: 00007ffd16bfc048