diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-03-15 22:29:27 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-03-15 22:29:27 +0000 |
commit | b92c8d74e26d38b2f8e478cbae32a12a4113d12b (patch) | |
tree | 41789331c10c51c4e0b023b8b2afde414310d3d9 /package | |
parent | f6f637f2ed1ac81deb3d86380f3a3eae855927bc (diff) | |
download | upstream-b92c8d74e26d38b2f8e478cbae32a12a4113d12b.tar.gz upstream-b92c8d74e26d38b2f8e478cbae32a12a4113d12b.tar.bz2 upstream-b92c8d74e26d38b2f8e478cbae32a12a4113d12b.zip |
mac80211: merge a fix for a race condition on station removal
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36053 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r-- | package/mac80211/patches/300-pending_work.patch | 32 |
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 3d4e85ddd7..72a0081c16 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--; |