diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-11-08 15:41:25 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-11-24 20:30:09 +0300 |
commit | 8e2f6f2366219b3304b227bdd2f04b64c92e3e12 (patch) | |
tree | 752dd50162b3a233e4263fb43cb185cf70e83bef /net/wireless | |
parent | 7e7efdda6adb385fbdfd6f819d76bc68c923c394 (diff) | |
download | linux-8e2f6f2366219b3304b227bdd2f04b64c92e3e12.tar.xz |
wifi: cfg80211: lock wiphy mutex for rfkill poll
We want to guarantee the mutex is held for pretty much
all operations, so ensure that here as well.
Reported-by: syzbot+7e59a5bfc7a897247e18@syzkaller.appspotmail.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 758c9a2a12c0..3f756ce46602 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -221,7 +221,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, |