aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Bondar <alexander.bondar@intel.com>2014-03-16 04:49:54 -0400
committerJohannes Berg <johannes.berg@intel.com>2014-03-19 16:29:55 -0400
commit71228a1eabaf7fa4b2c3060cfee60875254cec14 (patch)
tree5cc36e38156681b4b5b4336ae29c935f856330e1 /net
parent112c44b2df0984121a52fbda89425843b8e1a457 (diff)
mac80211: release sched_scan_sdata when stopping sched scan
Assuming sched_scan_stop operation is synchronous the driver may not necessary call ieee80211_sched_scan_stopped_work. Since this work is the only place where sched_scan_sdata is released we can possibly run into situation when it is never released. Fix this by releasing it just after calling drv_sched_scan_stop. Signed-off-by: Alexander Bondar <alexander.bondar@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/scan.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 836f500dfbf3..3ce7f2c8539a 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -1055,9 +1055,11 @@ int ieee80211_request_sched_scan_stop(struct ieee80211_sub_if_data *sdata)
1055 /* We don't want to restart sched scan anymore. */ 1055 /* We don't want to restart sched scan anymore. */
1056 local->sched_scan_req = NULL; 1056 local->sched_scan_req = NULL;
1057 1057
1058 if (rcu_access_pointer(local->sched_scan_sdata)) 1058 if (rcu_access_pointer(local->sched_scan_sdata)) {
1059 ret = drv_sched_scan_stop(local, sdata); 1059 ret = drv_sched_scan_stop(local, sdata);
1060 1060 if (!ret)
1061 rcu_assign_pointer(local->sched_scan_sdata, NULL);
1062 }
1061out: 1063out:
1062 mutex_unlock(&local->mtx); 1064 mutex_unlock(&local->mtx);
1063 1065