wifi: cfg80211: lock wiphy mutex for rfkill poll
Subsystems (3)
Sasha Levin
maintainerPATCH 1/1 wifi: cfg80211: lock wiphy mutex for rfkill poll
From: Johannes Berg <[email protected]>
[ Upstream commit 8e2f6f2366219b3304b227bdd2f04b64c92e3e12 ]
We want to guarantee the mutex is held for pretty much all operations, so ensure that here as well.
Reported-by [email protected]
Signed-off-by Johannes Berg <[email protected]>
Signed-off-by Sasha Levin <[email protected]>
--- net/wireless/core.c | 2 ++ 1 file changed, 2 insertions(+)
net/wireless/core.c +2 -0
@@ -202,7 +202,9 @@ static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data) {struct cfg80211_registered_device *rdev = data; +wiphy_lock (&rdev->wiphy);rdev_rfkill_poll (rdev); +wiphy_unlock (&rdev->wiphy); } void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev,
Signature · 1 line
2.42.0
net/wireless/core.c static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data) · line 205
Quoted 7 lines · Sasha Levin
+++
b/net/wireless/core.cnet/wireless/core.c +1
-0@@ -202,7 +202,9 @@ static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data) {struct cfg80211_registered_device *rdev = data; +wiphy_lock (&rdev->wiphy);
This can't even _build_ on this old kernel?!
Anyway, my locking rework only went into 6.7, so this doesn't make sense in any stable kernel, it's just not required.
johannes