diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 7807fa42ed3f4fcd8fc6b066cbf89cd987e1e331..05f0d711b6d8666701e91262141fb67711d9dad7 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -828,6 +828,11 @@ void ieee80211_scan_work(struct work_struct *work) mutex_lock(&local->mtx); + if (!ieee80211_can_run_worker(local)) { + aborted = true; + goto out_complete; + } + sdata = rcu_dereference_protected(local->scan_sdata, lockdep_is_held(&local->mtx)); scan_req = rcu_dereference_protected(local->scan_req,