Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -366,6 +366,12 @@ static void __ieee80211_key_destroy(struct ieee80211_key *key)
	if (!key)
	if (!key)
		return;
		return;


	/*
	 * Synchronize so the TX path can no longer be using
	 * this key before we free/remove it.
	 */
	synchronize_rcu();

	if (key->local)
	if (key->local)
		ieee80211_key_disable_hw_accel(key);
		ieee80211_key_disable_hw_accel(key);