Skip to content

Commit 5fe231e

Browse files
committed
cfg80211: vastly simplify locking
Virtually all code paths in cfg80211 already (need to) hold the RTNL. As such, there's little point in having another four mutexes for various parts of the code, they just cause lock ordering issues (and much of the time, the RTNL and a few of the others need thus be held.) Simplify all this by getting rid of the extra four mutexes and just use the RTNL throughout. Only a few code changes were needed to do this and we can get rid of a work struct for bonus points. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 73810b7 commit 5fe231e

14 files changed

Lines changed: 117 additions & 447 deletions

File tree

‎include/net/cfg80211.h‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,6 +1257,7 @@ struct cfg80211_ssid {
12571257
* @scan_start: time (in jiffies) when the scan started
12581258
* @wdev: the wireless device to scan for
12591259
* @aborted: (internal) scan request was notified as aborted
1260+
* @notified: (internal) scan request was notified as done or aborted
12601261
* @no_cck: used to send probe requests at non CCK rate in 2GHz band
12611262
*/
12621263
struct cfg80211_scan_request {
@@ -1274,7 +1275,7 @@ struct cfg80211_scan_request {
12741275
/* internal */
12751276
struct wiphy *wiphy;
12761277
unsigned long scan_start;
1277-
bool aborted;
1278+
bool aborted, notified;
12781279
bool no_cck;
12791280

12801281
/* keep last */
@@ -2874,8 +2875,6 @@ struct wireless_dev {
28742875

28752876
struct mutex mtx;
28762877

2877-
struct work_struct cleanup_work;
2878-
28792878
bool use_4addr, p2p_started;
28802879

28812880
u8 address[ETH_ALEN] __aligned(sizeof(u16));

0 commit comments

Comments
 (0)