Skip to content

Commit 8e2f6f2

Browse files
committed
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>
1 parent 7e7efdd commit 8e2f6f2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

net/wireless/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
221221
{
222222
struct cfg80211_registered_device *rdev = data;
223223

224+
wiphy_lock(&rdev->wiphy);
224225
rdev_rfkill_poll(rdev);
226+
wiphy_unlock(&rdev->wiphy);
225227
}
226228

227229
void cfg80211_stop_p2p_device(struct cfg80211_registered_device *rdev,

0 commit comments

Comments
 (0)