Skip to content

Commit 3e54ed8

Browse files
committed
wifi: cfg80211: fix locking in sched scan stop work
This should use wiphy_lock() now instead of acquiring the RTNL, since cfg80211_stop_sched_scan_req() now needs that. Fixes: a05829a ("cfg80211: avoid holding the RTNL when calling the driver") Signed-off-by: Johannes Berg <[email protected]>
1 parent 7a4615b commit 3e54ed8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

net/wireless/core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,12 @@ static void cfg80211_sched_scan_stop_wk(struct work_struct *work)
368368
rdev = container_of(work, struct cfg80211_registered_device,
369369
sched_scan_stop_wk);
370370

371-
rtnl_lock();
371+
wiphy_lock(&rdev->wiphy);
372372
list_for_each_entry_safe(req, tmp, &rdev->sched_scan_req_list, list) {
373373
if (req->nl_owner_dead)
374374
cfg80211_stop_sched_scan_req(rdev, req, false);
375375
}
376-
rtnl_unlock();
376+
wiphy_unlock(&rdev->wiphy);
377377
}
378378

379379
static void cfg80211_propagate_radar_detect_wk(struct work_struct *work)

0 commit comments

Comments
 (0)