summaryrefslogtreecommitdiffstats
path: root/net/mac80211/ht.c
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2013-06-12 14:08:44 -0700
committerJohannes Berg <johannes.berg@intel.com>2013-06-13 10:27:07 +0200
commite562078a19226660299eeaf40a50752672214f11 (patch)
tree09e911481176393b8e47913a594fce34828fb8a9 /net/mac80211/ht.c
parent661eb3811df568161399af0048f1ecb4ac073687 (diff)
downloadop-kernel-dev-e562078a19226660299eeaf40a50752672214f11.zip
op-kernel-dev-e562078a19226660299eeaf40a50752672214f11.tar.gz
mac80211: Ensure tid_start_tx is protected by sta->lock
All accesses of the tid_start_tx lock should be protected by sta->lock if there is any chance that another thread could still be accessing the sta object. Signed-off-by: Ben Greear <greearb@candelatech.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ht.c')
-rw-r--r--net/mac80211/ht.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 75dff33..f83534f 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -281,13 +281,14 @@ void ieee80211_ba_session_work(struct work_struct *work)
sta, tid, WLAN_BACK_RECIPIENT,
WLAN_REASON_UNSPECIFIED, true);
+ spin_lock_bh(&sta->lock);
+
tid_tx = sta->ampdu_mlme.tid_start_tx[tid];
if (tid_tx) {
/*
* Assign it over to the normal tid_tx array
* where it "goes live".
*/
- spin_lock_bh(&sta->lock);
sta->ampdu_mlme.tid_start_tx[tid] = NULL;
/* could there be a race? */
@@ -300,6 +301,7 @@ void ieee80211_ba_session_work(struct work_struct *work)
ieee80211_tx_ba_session_handle_start(sta, tid);
continue;
}
+ spin_unlock_bh(&sta->lock);
tid_tx = rcu_dereference_protected_tid_tx(sta, tid);
if (tid_tx && test_and_clear_bit(HT_AGG_STATE_WANT_STOP,
OpenPOWER on IntegriCloud