Skip to content

Commit 996c311

Browse files
Dan Carpenterjmberg-intel
authored andcommitted
wifi: cfg80211: fix double lock bug in reg_wdev_chan_valid()
The locking was changed recently so now the caller holds the wiphy_lock() lock. Taking the lock inside the reg_wdev_chan_valid() function will lead to a deadlock. Fixes: f7e6003 ("wifi: cfg80211: fix locking in regulatory disconnect") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/40c4114a-6cb4-4abf-b013-300b598aba65@moroto.mountain Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent f7e6003 commit 996c311

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

net/wireless/reg.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,11 +2404,8 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev)
24042404
case NL80211_IFTYPE_P2P_GO:
24052405
case NL80211_IFTYPE_ADHOC:
24062406
case NL80211_IFTYPE_MESH_POINT:
2407-
wiphy_lock(wiphy);
24082407
ret = cfg80211_reg_can_beacon_relax(wiphy, &chandef,
24092408
iftype);
2410-
wiphy_unlock(wiphy);
2411-
24122409
if (!ret)
24132410
return ret;
24142411
break;

0 commit comments

Comments
 (0)