diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-01-03 19:42:24 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 14:46:47 -0800 |
commit | 5efbd432c45ff09f0cafd8f1329693d3fb802fff (patch) | |
tree | 88048b1223d557f24a1e2ec78410c91473ad216c /net | |
parent | fc17a355cce36e03c43d7f06001296267f90c822 (diff) |
mac80211: add missing synchronize_rcu
commit d2460f4b2fa6dbdeec800414f9cf5b1fc8b71197 upstream.
commit ad0e2b5a00dbec303e4682b403bb6703d11dcdb2
Author: Johannes Berg <johannes.berg@intel.com>
Date: Tue Jun 1 10:19:19 2010 +0200
mac80211: simplify key locking
removed the synchronization against RCU and thus
opened a race window where we can use a key for
TX while it is already freed. Put a synchronisation
into the right place to close that window.
Reported-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/key.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/key.c b/net/mac80211/key.c index 1b9d87ed143..3f76484221a 100644 --- a/net/mac80211/key.c +++ b/net/mac80211/key.c @@ -323,6 +323,12 @@ static void __ieee80211_key_destroy(struct ieee80211_key *key) if (!key) return; + /* + * Synchronize so the TX path can no longer be using + * this key before we free/remove it. + */ + synchronize_rcu(); + if (key->local) ieee80211_key_disable_hw_accel(key); |