Commit a8767f2c authored by Johannes Berg's avatar Johannes Berg Committed by Greg Kroah-Hartman

mac80211: add missing synchronize_rcu

commit d2460f4b upstream.

commit ad0e2b5a
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: default avatarJussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 3524a55c
......@@ -366,6 +366,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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment