From: Hillf Danton <hdanton@sina.com>
To: syzbot <syzbot+5b9196ecf74447172a9a@syzkaller.appspotmail.com>
Cc: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [wireless?] possible deadlock in ieee80211_remove_interfaces
Date: Sun, 19 Jan 2025 14:54:09 +0800 [thread overview]
Message-ID: <20250119065410.2116-1-hdanton@sina.com> (raw)
In-Reply-To: <678aaa6d.050a0220.303755.0013.GAE@google.com>
On Fri, 17 Jan 2025 11:07:25 -0800
> syzbot has found a reproducer for the following issue on:
>
> HEAD commit: 8d20dcda404d selftests: drv-net-hw: inject pp_alloc_fail e..
> git tree: net-next
> C reproducer: https://syzkaller.appspot.com/x/repro.c?x=13ca3a18580000
#syz test
diff -pur p/include/linux/netdevice.h q/include/linux/netdevice.h
--- p/include/linux/netdevice.h 2025-01-19 14:23:21.962713400 +0800
+++ q/include/linux/netdevice.h 2025-01-19 14:44:32.303599900 +0800
@@ -2047,6 +2047,7 @@ enum netdev_reg_state {
* FIXME: cleanup struct net_device such that network protocol info
* moves out.
*/
+extern unsigned long extra_netdev_locks;
struct net_device {
/* Cacheline organization can be found documented in
diff -pur p/net/core/dev.c q/net/core/dev.c
--- p/net/core/dev.c 2025-01-19 14:26:04.863348200 +0800
+++ q/net/core/dev.c 2025-01-19 14:35:42.722041700 +0800
@@ -10269,14 +10269,19 @@ static bool from_cleanup_net(void)
#endif
}
+unsigned long extra_netdev_locks = 0;
static void rtnl_drop_if_cleanup_net(void)
{
+ if (extra_netdev_locks)
+ return;
if (from_cleanup_net())
__rtnl_unlock();
}
static void rtnl_acquire_if_cleanup_net(void)
{
+ if (extra_netdev_locks)
+ return;
if (from_cleanup_net())
rtnl_lock();
}
diff -pur p/net/wireless/core.c q/net/wireless/core.c
--- p/net/wireless/core.c 2025-01-19 14:29:30.497265000 +0800
+++ q/net/wireless/core.c 2025-01-19 14:40:07.687903000 +0800
@@ -1247,8 +1247,11 @@ static void _cfg80211_unregister_wdev(st
if (wdev->netdev) {
sysfs_remove_link(&wdev->netdev->dev.kobj, "phy80211");
- if (unregister_netdev)
+ if (unregister_netdev) {
+ extra_netdev_locks++;
unregister_netdevice(wdev->netdev);
+ extra_netdev_locks--;
+ }
}
list_del_rcu(&wdev->list);
--
next prev parent reply other threads:[~2025-01-19 6:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 20:10 syzbot
2025-01-17 3:58 ` syzbot
2025-01-17 4:14 ` Eric Dumazet
2025-01-28 18:13 ` Aleksandr Nogikh
2025-01-28 18:16 ` Eric Dumazet
2025-01-17 19:07 ` syzbot
2025-01-19 6:54 ` Hillf Danton [this message]
2025-01-19 7:25 ` syzbot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250119065410.2116-1-hdanton@sina.com \
--to=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=syzbot+5b9196ecf74447172a9a@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome