Commit d2460f4b authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

mac80211: add missing synchronize_rcu

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>
Cc: stable@kernel.org [2.6.36+]
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 919bbad5
......@@ -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