====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc7-syzkaller-00074-ga7f2e10ecd8f #0 Not tainted ------------------------------------------------------ syz.0.1879/14719 is trying to acquire lock: ffff888022970768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: class_wiphy_constructor include/net/cfg80211.h:6061 [inline] ffff888022970768 (&rdev->wiphy.mtx){+.+.}-{4:4}, at: ieee80211_change_mac+0x110/0x1480 net/mac80211/iface.c:307 but task is already holding lock: ffffffff8feebed0 (dev_addr_sem){++++}-{4:4}, at: dev_set_mac_address_user+0x22/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}: 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#20){++++}-{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] __ia32_sys_close+0x86/0x100 fs/open.c:1565 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e -> #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_change_mac+0x110/0x1480 net/mac80211/iface.c:307 dev_set_mac_address+0x301/0x4a0 net/core/dev.c:9515 dev_set_mac_address_user+0x30/0x50 net/core/dev.c:9534 dev_ifsioc+0xb8d/0x10d0 net/core/dev_ioctl.c:575 dev_ioctl+0x224/0x10c0 net/core/dev_ioctl.c:826 sock_do_ioctl+0x19e/0x280 net/socket.c:1213 compat_sock_ioctl_trans net/socket.c:3488 [inline] compat_sock_ioctl+0x318/0x7e0 net/socket.c:3514 __do_compat_sys_ioctl+0x1cb/0x2c0 fs/ioctl.c:1004 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e other info that might help us debug this: Chain exists of: &rdev->wiphy.mtx --> kn->active#20 --> dev_addr_sem Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(dev_addr_sem); lock(kn->active#20); lock(dev_addr_sem); lock(&rdev->wiphy.mtx); *** DEADLOCK *** 2 locks held by syz.0.1879/14719: #0: ffffffff8fefa3e8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:129 [inline] #0: ffffffff8fefa3e8 (rtnl_mutex){+.+.}-{4:4}, at: dev_ioctl+0x213/0x10c0 net/core/dev_ioctl.c:825 #1: ffffffff8feebed0 (dev_addr_sem){++++}-{4:4}, at: dev_set_mac_address_user+0x22/0x50 net/core/dev.c:9533 stack backtrace: CPU: 3 UID: 0 PID: 14719 Comm: syz.0.1879 Not tainted 6.14.0-rc7-syzkaller-00074-ga7f2e10ecd8f #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 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_change_mac+0x110/0x1480 net/mac80211/iface.c:307 dev_set_mac_address+0x301/0x4a0 net/core/dev.c:9515 dev_set_mac_address_user+0x30/0x50 net/core/dev.c:9534 dev_ifsioc+0xb8d/0x10d0 net/core/dev_ioctl.c:575 dev_ioctl+0x224/0x10c0 net/core/dev_ioctl.c:826 sock_do_ioctl+0x19e/0x280 net/socket.c:1213 compat_sock_ioctl_trans net/socket.c:3488 [inline] compat_sock_ioctl+0x318/0x7e0 net/socket.c:3514 __do_compat_sys_ioctl+0x1cb/0x2c0 fs/ioctl.c:1004 do_syscall_32_irqs_on arch/x86/entry/common.c:165 [inline] __do_fast_syscall_32+0x73/0x120 arch/x86/entry/common.c:387 do_fast_syscall_32+0x32/0x80 arch/x86/entry/common.c:412 entry_SYSENTER_compat_after_hwframe+0x84/0x8e RIP: 0023:0xf7ff4579 Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00 RSP: 002b:00000000f50f555c EFLAGS: 00000296 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 000000000000000c RCX: 0000000000008924 RDX: 00000000800000c0 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000 R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000 ---------------- Code disassembly (best guess), 2 bytes skipped: 0: 10 06 adc %al,(%rsi) 2: 03 74 b4 01 add 0x1(%rsp,%rsi,4),%esi 6: 10 07 adc %al,(%rdi) 8: 03 74 b0 01 add 0x1(%rax,%rsi,4),%esi c: 10 08 adc %cl,(%rax) e: 03 74 d8 01 add 0x1(%rax,%rbx,8),%esi 1e: 00 51 52 add %dl,0x52(%rcx) 21: 55 push %rbp 22: 89 e5 mov %esp,%ebp 24: 0f 34 sysenter 26: cd 80 int $0x80 * 28: 5d pop %rbp <-- trapping instruction 29: 5a pop %rdx 2a: 59 pop %rcx 2b: c3 ret 2c: 90 nop 2d: 90 nop 2e: 90 nop 2f: 90 nop 30: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi 37: 8d b4 26 00 00 00 00 lea 0x0(%rsi,%riz,1),%esi