====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc6-syzkaller-01313-g23c9ff659140 #0 Not tainted ------------------------------------------------------ syz.4.2227/12885 is trying to acquire lock: ffff88807d208768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6063 [inline] ffff88807d208768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_change_mac+0xc6/0x1160 net/mac80211/iface.c:307 but task is already holding lock: ffff88807f7e4d28 (&dev->lock){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2731 [inline] ffff88807f7e4d28 (&dev->lock){+.+.}-{4:4}, at: dev_set_mac_address+0x2a/0x50 net/core/dev_api.c:302 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 (&dev->lock){+.+.}-{4:4}: 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 netdev_lock include/linux/netdevice.h:2731 [inline] register_netdevice+0x12d8/0x1b70 net/core/dev.c:10994 cfg80211_register_netdevice+0x149/0x2f0 net/wireless/core.c:1489 ieee80211_if_add+0x119d/0x1780 net/mac80211/iface.c:2225 ieee80211_register_hw+0x3708/0x42e0 net/mac80211/main.c:1604 mac80211_hwsim_new_radio+0x2a89/0x49f0 drivers/net/wireless/virtual/mac80211_hwsim.c:5559 init_mac80211_hwsim+0x87a/0xb00 drivers/net/wireless/virtual/mac80211_hwsim.c:6911 do_one_initcall+0x248/0x930 init/main.c:1257 do_initcall_level+0x157/0x210 init/main.c:1319 do_initcalls+0x71/0xd0 init/main.c:1335 kernel_init_freeable+0x435/0x5d0 init/main.c:1568 kernel_init+0x1d/0x2b0 init/main.c:1457 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:148 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #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:6063 [inline] ieee80211_change_mac+0xc6/0x1160 net/mac80211/iface.c:307 netif_set_mac_address+0x327/0x510 net/core/dev.c:9590 dev_set_mac_address+0x38/0x50 net/core/dev_api.c:303 dev_ifsioc+0xdf4/0x1130 net/core/dev_ioctl.c:578 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:840 sock_do_ioctl+0x240/0x460 net/socket.c:1204 sock_ioctl+0x626/0x8e0 net/socket.c:1309 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: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&dev->lock); lock(&rdev->wiphy.mtx); lock(&dev->lock); lock(&rdev->wiphy.mtx); *** DEADLOCK *** 2 locks held by syz.4.2227/12885: #0: ffffffff8fed6e08 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:130 [inline] #0: ffffffff8fed6e08 (rtnl_mutex){+.+.}-{4:4}, at: dev_ioctl+0x706/0x1340 net/core/dev_ioctl.c:839 #1: ffff88807f7e4d28 (&dev->lock){+.+.}-{4:4}, at: netdev_lock include/linux/netdevice.h:2731 [inline] #1: ffff88807f7e4d28 (&dev->lock){+.+.}-{4:4}, at: dev_set_mac_address+0x2a/0x50 net/core/dev_api.c:302 stack backtrace: CPU: 1 UID: 0 PID: 12885 Comm: syz.4.2227 Not tainted 6.14.0-rc6-syzkaller-01313-g23c9ff659140 #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:6063 [inline] ieee80211_change_mac+0xc6/0x1160 net/mac80211/iface.c:307 netif_set_mac_address+0x327/0x510 net/core/dev.c:9590 dev_set_mac_address+0x38/0x50 net/core/dev_api.c:303 dev_ifsioc+0xdf4/0x1130 net/core/dev_ioctl.c:578 dev_ioctl+0x719/0x1340 net/core/dev_ioctl.c:840 sock_do_ioctl+0x240/0x460 net/socket.c:1204 sock_ioctl+0x626/0x8e0 net/socket.c:1309 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:0x7f44e118d169 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:00007f44deff6038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f44e13a5fa0 RCX: 00007f44e118d169 RDX: 0000400000000000 RSI: 0000000000008924 RDI: 0000000000000004 RBP: 00007f44e120e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f44e13a5fa0 R15: 00007ffcbe9b0218