Skip to content

Commit f7e6003

Browse files
committed
wifi: cfg80211: fix locking in regulatory disconnect
This should use wiphy_lock() now instead of requiring the RTNL, since __cfg80211_leave() via cfg80211_leave() is now requiring that lock to be held. Fixes: a05829a ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg <[email protected]>
1 parent 3e54ed8 commit f7e6003

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/wireless/reg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2440,11 +2440,11 @@ static void reg_leave_invalid_chans(struct wiphy *wiphy)
24402440
struct wireless_dev *wdev;
24412441
struct cfg80211_registered_device *rdev = wiphy_to_rdev(wiphy);
24422442

2443-
ASSERT_RTNL();
2444-
2443+
wiphy_lock(wiphy);
24452444
list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list)
24462445
if (!reg_wdev_chan_valid(wiphy, wdev))
24472446
cfg80211_leave(rdev, wdev);
2447+
wiphy_unlock(wiphy);
24482448
}
24492449

24502450
static void reg_check_chans_work(struct work_struct *work)

0 commit comments

Comments
 (0)