============================================ WARNING: possible recursive locking detected 5.12.0-rc4-syzkaller #0 Not tainted -------------------------------------------- syz-executor.2/1586 is trying to acquire lock: ffff8880281e85e8 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5269 [inline] ffff8880281e85e8 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: cfg80211_netdev_notifier_call+0x704/0x11d0 net/wireless/core.c:1415 but task is already holding lock: ffff8880281e85e8 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5269 [inline] ffff8880281e85e8 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: nl80211_pre_doit+0x391/0x5c0 net/wireless/nl80211.c:14845 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&rdev->wiphy.mtx); lock(&rdev->wiphy.mtx); *** DEADLOCK *** May be due to missing lock nesting notation 3 locks held by syz-executor.2/1586: #0: ffffffff8d6fbe30 (cb_lock){++++}-{3:3}, at: genl_rcv+0x15/0x40 net/netlink/genetlink.c:810 #1: ffffffff8d66b2a8 (rtnl_mutex){+.+.}-{3:3}, at: nl80211_pre_doit+0x23/0x5c0 net/wireless/nl80211.c:14801 #2: ffff8880281e85e8 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: wiphy_lock include/net/cfg80211.h:5269 [inline] #2: ffff8880281e85e8 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: nl80211_pre_doit+0x391/0x5c0 net/wireless/nl80211.c:14845 stack backtrace: CPU: 1 PID: 1586 Comm: syz-executor.2 Not tainted 5.12.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_deadlock_bug kernel/locking/lockdep.c:2829 [inline] check_deadlock kernel/locking/lockdep.c:2872 [inline] validate_chain kernel/locking/lockdep.c:3661 [inline] __lock_acquire.cold+0x14c/0x3b4 kernel/locking/lockdep.c:4900 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x740 kernel/locking/lockdep.c:5475 __mutex_lock_common kernel/locking/mutex.c:949 [inline] __mutex_lock+0x139/0x1120 kernel/locking/mutex.c:1096 wiphy_lock include/net/cfg80211.h:5269 [inline] cfg80211_netdev_notifier_call+0x704/0x11d0 net/wireless/core.c:1415 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2075 call_netdevice_notifiers_extack net/core/dev.c:2087 [inline] call_netdevice_notifiers net/core/dev.c:2101 [inline] __dev_close_many+0xf3/0x2f0 net/core/dev.c:1621 dev_close_many+0x22c/0x620 net/core/dev.c:1672 dev_close net/core/dev.c:1698 [inline] dev_close+0x16d/0x210 net/core/dev.c:1692 ieee80211_do_stop+0x1276/0x20e0 net/mac80211/iface.c:485 ieee80211_runtime_change_iftype net/mac80211/iface.c:1640 [inline] ieee80211_if_change_type+0x2c5/0x6e0 net/mac80211/iface.c:1678 ieee80211_change_iface+0x26/0x210 net/mac80211/cfg.c:157 rdev_change_virtual_intf net/wireless/rdev-ops.h:69 [inline] cfg80211_change_iface+0x335/0xf30 net/wireless/util.c:1067 nl80211_set_interface+0x65c/0x8d0 net/wireless/nl80211.c:3912 genl_family_rcv_msg_doit+0x228/0x320 net/netlink/genetlink.c:739 genl_family_rcv_msg net/netlink/genetlink.c:783 [inline] genl_rcv_msg+0x328/0x580 net/netlink/genetlink.c:800 netlink_rcv_skb+0x153/0x420 net/netlink/af_netlink.c:2502 genl_rcv+0x24/0x40 net/netlink/genetlink.c:811 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1927 sock_sendmsg_nosec net/socket.c:654 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:674 ____sys_sendmsg+0x6e8/0x810 net/socket.c:2350 ___sys_sendmsg+0xf3/0x170 net/socket.c:2404 __sys_sendmsg+0xe5/0x1b0 net/socket.c:2433 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466459 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f4d29c8c188 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 000000000056bf60 RCX: 0000000000466459 RDX: 0000000000000000 RSI: 0000000020000340 RDI: 0000000000000003 RBP: 00000000004bf9fb R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf60 R13: 00007fff50c0956f R14: 00007f4d29c8c300 R15: 0000000000022000