mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
wifi: cfg80211: fix double lock bug in reg_wdev_chan_valid()
commit996c3117daupstream. 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:f7e60032c6("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b11f953a61
commit
6d304091e0
@@ -2442,11 +2442,8 @@ static bool reg_wdev_chan_valid(struct wiphy *wiphy, struct wireless_dev *wdev)
|
|||||||
case NL80211_IFTYPE_P2P_GO:
|
case NL80211_IFTYPE_P2P_GO:
|
||||||
case NL80211_IFTYPE_ADHOC:
|
case NL80211_IFTYPE_ADHOC:
|
||||||
case NL80211_IFTYPE_MESH_POINT:
|
case NL80211_IFTYPE_MESH_POINT:
|
||||||
wiphy_lock(wiphy);
|
|
||||||
ret = cfg80211_reg_can_beacon_relax(wiphy, &chandef,
|
ret = cfg80211_reg_can_beacon_relax(wiphy, &chandef,
|
||||||
iftype);
|
iftype);
|
||||||
wiphy_unlock(wiphy);
|
|
||||||
|
|
||||||
if (!ret)
|
if (!ret)
|
||||||
return ret;
|
return ret;
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user