summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2013-12-11 20:39:46 +0200
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 13:38:49 +0100
commit6f07d216f5662def442cb8034f45119b5a33f6ff (patch)
tree45e1eda25e453f6ac5f96469dfbaf19c4126b616 /net
parent70dabeb74ee3bff71b65f47546dafb83edbb06b9 (diff)
downloadlinux-6f07d216f5662def442cb8034f45119b5a33f6ff.tar.gz
linux-6f07d216f5662def442cb8034f45119b5a33f6ff.tar.bz2
linux-6f07d216f5662def442cb8034f45119b5a33f6ff.zip
mac80211: lock sdata in ieee80211_csa_connection_drop_work()
We call ieee80211_ibss_disconnect(), which requires sdata to be locked, so lock the sdata during ieee80211_csa_connection_drop_work(). Cc: Simon Wunderlich <sw@simonwunderlich.de> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/ibss.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index e97fa7fac96e..a6ca56dfe0d7 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -753,12 +753,16 @@ static void ieee80211_csa_connection_drop_work(struct work_struct *work)
container_of(work, struct ieee80211_sub_if_data,
u.ibss.csa_connection_drop_work);
+ sdata_lock(sdata);
+
ieee80211_ibss_disconnect(sdata);
synchronize_rcu();
skb_queue_purge(&sdata->skb_queue);
/* trigger a scan to find another IBSS network to join */
ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+
+ sdata_unlock(sdata);
}
static void ieee80211_ibss_csa_mark_radar(struct ieee80211_sub_if_data *sdata)