From: syzbot <syzbot+e9cbd080a7801f06cf08@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Forwarded: [PATCH test v2] wifi: mac80211: acquire wiphy lock for unlisted sdata teardown
Date: Sat, 03 Oct 2026 03:37:08 -0700 [thread overview]
Message-ID: <6ac0dad4.9ad129c8.3858c0.0012.GAE@google.com> (raw)
In-Reply-To: <6a940044.1d9ded08.62e62.011a.GAE@google.com>
For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.
***
Subject: [PATCH test v2] wifi: mac80211: acquire wiphy lock for unlisted sdata teardown
Author: rajojha047@gmail.com
#syz test: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 5f0c482..175965f 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -931,7 +931,7 @@ static void ieee80211_teardown_sdata(struct ieee80211_sub_if_data *sdata)
* core when cfg80211 couldn't move it out of a network namespace that's being
* destroyed. Drop it from the interface list either way.
*/
-static void ieee80211_unlist_sdata(struct ieee80211_sub_if_data *sdata)
+static bool ieee80211_unlist_sdata(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_local *local = sdata->local;
struct ieee80211_sub_if_data *iter;
@@ -943,16 +943,25 @@ static void ieee80211_unlist_sdata(struct ieee80211_sub_if_data *sdata)
continue;
guard(mutex)(&local->iflist_mtx);
list_del_rcu(&sdata->list);
- return;
+ return true;
}
+
+ return false;
}
static void ieee80211_uninit(struct net_device *dev)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct wiphy *wiphy = sdata->local->hw.wiphy;
+ bool unlisted = ieee80211_unlist_sdata(sdata);
+
+ if (unlisted)
+ wiphy_lock(wiphy);
- ieee80211_unlist_sdata(sdata);
ieee80211_teardown_sdata(sdata);
+
+ if (unlisted)
+ wiphy_unlock(wiphy);
}
static int ieee80211_netdev_setup_tc(struct net_device *dev,
prev parent reply other threads:[~2026-10-03 10:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-30 10:04 [syzbot] WARNING in wiphy_delayed_work_cancel syzbot
2026-10-03 10:05 ` Forwarded: [PATCH test] wifi: mac80211: acquire wiphy lock in ieee80211_uninit() syzbot
2026-10-03 10:13 ` syzbot
2026-10-03 10:37 ` syzbot [this message]
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=6ac0dad4.9ad129c8.3858c0.0012.GAE@google.com \
--to=syzbot+e9cbd080a7801f06cf08@syzkaller.appspotmail.com \
--cc=linux-kernel@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.