====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ syz.3.1303/11242 is trying to acquire lock: ffff888048aacf08 (kn->active#19){++++}-{0:0}, at: __kernfs_remove+0x493/0x8e0 fs/kernfs/dir.c:1580 but task is already holding lock: ffff88804da807a0 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6885 [inline] ffff88804da807a0 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_remove_interfaces+0x132/0x6c0 net/mac80211/iface.c:2455 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rdev->wiphy.mtx){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:646 [inline] __mutex_lock+0x1a3/0x1550 kernel/locking/mutex.c:820 class_wiphy_constructor include/net/cfg80211.h:6885 [inline] ieee80211_change_mac+0xba/0x1350 net/mac80211/iface.c:324 netif_set_mac_address+0x317/0x4e0 net/core/dev.c:9987 do_setlink+0x9bb/0x45a0 net/core/rtnetlink.c:3159 rtnl_changelink net/core/rtnetlink.c:3841 [inline] __rtnl_newlink net/core/rtnetlink.c:4014 [inline] rtnl_newlink+0x15ad/0x1bb0 net/core/rtnetlink.c:4151 rtnetlink_rcv_msg+0x7d5/0xbe0 net/core/rtnetlink.c:7068 netlink_rcv_skb+0x232/0x4b0 net/netlink/af_netlink.c:2556 netlink_unicast_kernel net/netlink/af_netlink.c:1319 [inline] netlink_unicast+0x75c/0x8e0 net/netlink/af_netlink.c:1345 netlink_sendmsg+0x813/0xb40 net/netlink/af_netlink.c:1900 sock_sendmsg_nosec net/socket.c:787 [inline] __sock_sendmsg net/socket.c:802 [inline] ____sys_sendmsg+0x972/0x9f0 net/socket.c:2698 ___sys_sendmsg+0x2a5/0x360 net/socket.c:2752 __sys_sendmsg net/socket.c:2784 [inline] __do_sys_sendmsg net/socket.c:2789 [inline] __se_sys_sendmsg net/socket.c:2787 [inline] __x64_sys_sendmsg+0x1bd/0x2a0 net/socket.c:2787 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #1 (dev_addr_sem){++++}-{4:4}: down_read+0x47/0x2e0 kernel/locking/rwsem.c:1568 address_show+0x25/0x250 net/core/net-sysfs.c:260 dev_attr_show+0x58/0xc0 drivers/base/core.c:2421 sysfs_kf_seq_show+0x310/0x490 fs/sysfs/file.c:65 seq_read_iter+0x4ef/0xe10 fs/seq_file.c:231 new_sync_read fs/read_write.c:493 [inline] vfs_read+0x582/0xa70 fs/read_write.c:574 ksys_read+0x150/0x270 fs/read_write.c:717 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x174/0x580 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (kn->active#19){++++}-{0:0}: check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 kernfs_drain+0x2c2/0x6a0 fs/kernfs/dir.c:532 __kernfs_remove+0x493/0x8e0 fs/kernfs/dir.c:1580 kernfs_remove_by_name_ns+0xc0/0x140 fs/kernfs/dir.c:1798 kernfs_remove_by_name include/linux/kernfs.h:639 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0xfc/0x2e0 fs/sysfs/group.c:328 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:352 device_remove_groups drivers/base/core.c:2844 [inline] device_remove_attrs+0x229/0x280 drivers/base/core.c:2980 device_del+0x51f/0x8f0 drivers/base/core.c:3894 unregister_netdevice_many_notify+0x1b5a/0x20c0 net/core/dev.c:12468 unregister_netdevice_many net/core/dev.c:12496 [inline] unregister_netdevice_queue+0x31f/0x360 net/core/dev.c:12308 unregister_netdevice include/linux/netdevice.h:3454 [inline] _cfg80211_unregister_wdev+0x155/0x580 net/wireless/core.c:1423 ieee80211_remove_interfaces+0x49c/0x6c0 net/mac80211/iface.c:2480 ieee80211_unregister_hw+0x5d/0x2c0 net/mac80211/main.c:1717 mac80211_hwsim_del_radio+0x28a/0x4a0 drivers/net/wireless/virtual/mac80211_hwsim_main.c:6215 remove_user_radios drivers/net/wireless/virtual/mac80211_hwsim_main.c:7116 [inline] mac80211_hwsim_netlink_notify+0xfae/0x1310 drivers/net/wireless/virtual/mac80211_hwsim_main.c:7130 notifier_call_chain+0x1ad/0x3d0 kernel/notifier.c:85 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 netlink_release+0x123b/0x1ad0 net/netlink/af_netlink.c:762 __sock_release net/socket.c:722 [inline] sock_close+0xc3/0x240 net/socket.c:1514 __fput+0x44f/0xa60 fs/file_table.c:510 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0x193/0x680 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x353/0x580 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f other info that might help us debug this: Chain exists of: kn->active#19 --> dev_addr_sem --> &rdev->wiphy.mtx Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rdev->wiphy.mtx); lock(dev_addr_sem); lock(&rdev->wiphy.mtx); lock(kn->active#19); *** DEADLOCK *** 4 locks held by syz.3.1303/11242: #0: ffff88807850a4c0 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1029 [inline] #0: ffff88807850a4c0 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: __sock_release net/socket.c:721 [inline] #0: ffff88807850a4c0 (&sb->s_type->i_mutex_key#13){+.+.}-{4:4}, at: sock_close+0x9b/0x240 net/socket.c:1514 #1: ffffffff8fe382a8 ((netlink_chain).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain+0x54/0x90 kernel/notifier.c:379 #2: ffffffff8fdc9d00 (rtnl_mutex){+.+.}-{4:4}, at: ieee80211_unregister_hw+0x55/0x2c0 net/mac80211/main.c:1710 #3: ffff88804da807a0 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6885 [inline] #3: ffff88804da807a0 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_remove_interfaces+0x132/0x6c0 net/mac80211/iface.c:2455 stack backtrace: CPU: 0 UID: 0 PID: 11242 Comm: syz.3.1303 Not tainted syzkaller #0 PREEMPT(full) Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/09/2026 Call Trace: dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120 print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043 check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175 check_prev_add kernel/locking/lockdep.c:3165 [inline] check_prevs_add kernel/locking/lockdep.c:3284 [inline] validate_chain kernel/locking/lockdep.c:3908 [inline] __lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237 lock_acquire+0x106/0x350 kernel/locking/lockdep.c:5868 kernfs_drain+0x2c2/0x6a0 fs/kernfs/dir.c:532 __kernfs_remove+0x493/0x8e0 fs/kernfs/dir.c:1580 kernfs_remove_by_name_ns+0xc0/0x140 fs/kernfs/dir.c:1798 kernfs_remove_by_name include/linux/kernfs.h:639 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0xfc/0x2e0 fs/sysfs/group.c:328 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:352 device_remove_groups drivers/base/core.c:2844 [inline] device_remove_attrs+0x229/0x280 drivers/base/core.c:2980 device_del+0x51f/0x8f0 drivers/base/core.c:3894 unregister_netdevice_many_notify+0x1b5a/0x20c0 net/core/dev.c:12468 unregister_netdevice_many net/core/dev.c:12496 [inline] unregister_netdevice_queue+0x31f/0x360 net/core/dev.c:12308 unregister_netdevice include/linux/netdevice.h:3454 [inline] _cfg80211_unregister_wdev+0x155/0x580 net/wireless/core.c:1423 ieee80211_remove_interfaces+0x49c/0x6c0 net/mac80211/iface.c:2480 ieee80211_unregister_hw+0x5d/0x2c0 net/mac80211/main.c:1717 mac80211_hwsim_del_radio+0x28a/0x4a0 drivers/net/wireless/virtual/mac80211_hwsim_main.c:6215 remove_user_radios drivers/net/wireless/virtual/mac80211_hwsim_main.c:7116 [inline] mac80211_hwsim_netlink_notify+0xfae/0x1310 drivers/net/wireless/virtual/mac80211_hwsim_main.c:7130 notifier_call_chain+0x1ad/0x3d0 kernel/notifier.c:85 blocking_notifier_call_chain+0x6a/0x90 kernel/notifier.c:380 netlink_release+0x123b/0x1ad0 net/netlink/af_netlink.c:762 __sock_release net/socket.c:722 [inline] sock_close+0xc3/0x240 net/socket.c:1514 __fput+0x44f/0xa60 fs/file_table.c:510 task_work_run+0x1d9/0x270 kernel/task_work.c:233 resume_user_mode_work include/linux/resume_user_mode.h:50 [inline] __exit_to_user_mode_loop kernel/entry/common.c:67 [inline] exit_to_user_mode_loop+0x193/0x680 kernel/entry/common.c:98 __exit_to_user_mode_prepare include/linux/irq-entry-common.h:207 [inline] syscall_exit_to_user_mode_prepare include/linux/irq-entry-common.h:230 [inline] syscall_exit_to_user_mode include/linux/entry-common.h:318 [inline] do_syscall_64+0x353/0x580 arch/x86/entry/syscall_64.c:100 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f7c60d9ce59 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffd884ed628 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4 RAX: 0000000000000000 RBX: 00007ffd884ed710 RCX: 00007f7c60d9ce59 RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003 RBP: 000000000004083e R08: 0000000000000001 R09: 0000000000000000 R10: 0000001b33e20000 R11: 0000000000000246 R12: 00007ffd884ed750 R13: 00007f7c61015fac R14: 00000000000408f2 R15: 00007f7c61015fa0