summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-03-15 22:29:27 +0000
committerFelix Fietkau <nbd@openwrt.org>2013-03-15 22:29:27 +0000
commit132a54f6468793348b5f713f59cb55c68ecfdba1 (patch)
treec211ed291411fe5efc45b134495df8a7240f4bb1 /package
parent1996cfe9dd27d6f369983bb024b31f01acd0e267 (diff)
downloadmtk-20170518-132a54f6468793348b5f713f59cb55c68ecfdba1.zip
mtk-20170518-132a54f6468793348b5f713f59cb55c68ecfdba1.tar.gz
mtk-20170518-132a54f6468793348b5f713f59cb55c68ecfdba1.tar.bz2
mac80211: merge a fix for a race condition on station removal
SVN-Revision: 36053
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/300-pending_work.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 3d4e85d..72a0081 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -896,3 +896,35 @@
if (needreset) {
ath_dbg(ath9k_hw_common(sc->sc_ah), RESET,
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -766,6 +766,7 @@ int __must_check __sta_info_destroy(stru
+ struct ieee80211_local *local;
+ struct ieee80211_sub_if_data *sdata;
+ int ret, i;
++ bool have_key = false;
+
+ might_sleep();
+
+@@ -793,12 +794,19 @@ int __must_check __sta_info_destroy(stru
+ list_del_rcu(&sta->list);
+
+ mutex_lock(&local->key_mtx);
+- for (i = 0; i < NUM_DEFAULT_KEYS; i++)
++ for (i = 0; i < NUM_DEFAULT_KEYS; i++) {
+ __ieee80211_key_free(key_mtx_dereference(local, sta->gtk[i]));
+- if (sta->ptk)
++ have_key = true;
++ }
++ if (sta->ptk) {
+ __ieee80211_key_free(key_mtx_dereference(local, sta->ptk));
++ have_key = true;
++ }
+ mutex_unlock(&local->key_mtx);
+
++ if (!have_key)
++ synchronize_net();
++
+ sta->dead = true;
+
+ local->num_sta--;