Skip to content

Commit

Permalink
wifi: cfg80211: wext: hold wiphy lock in siwgenie
Browse files Browse the repository at this point in the history
Missed this ioctl since it's in wext-sme.c where we
usually get via a front-level ioctl handler in the
other files, but it should also hold the wiphy lock
to align the locking contract towards the driver.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jun 7, 2023
1 parent a993df0 commit 7d2d0ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion net/wireless/wext-sme.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* cfg80211 wext compat for managed mode.
*
* Copyright 2009 Johannes Berg <johannes@sipsolutions.net>
* Copyright (C) 2009, 2020-2022 Intel Corporation
* Copyright (C) 2009, 2020-2023 Intel Corporation
*/

#include <linux/export.h>
Expand Down Expand Up @@ -338,6 +338,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
if (!ie_len)
ie = NULL;

wiphy_lock(wdev->wiphy);
wdev_lock(wdev);

/* no change */
Expand Down Expand Up @@ -370,6 +371,7 @@ int cfg80211_wext_siwgenie(struct net_device *dev,
err = 0;
out:
wdev_unlock(wdev);
wiphy_unlock(wdev->wiphy);
return err;
}

Expand Down

0 comments on commit 7d2d0ff

Please sign in to comment.