Skip to content

Commit

Permalink
mac80211: use synchronize_net() on key destroying
Browse files Browse the repository at this point in the history
__ieee80211_key_destroy() calls synchronize_rcu() in
order to sync the tx path before destroying the key.

However, synching the tx path can be done with
synchronize_net() as well, which is usually faster
(the timing might be important for roaming scenarios).

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Eliad Peller authored and Johannes Berg committed Sep 6, 2012
1 parent 761a48d commit 964b19f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/mac80211/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ static void __ieee80211_key_destroy(struct ieee80211_key *key)
* Synchronize so the TX path can no longer be using
* this key before we free/remove it.
*/
synchronize_rcu();
synchronize_net();

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

0 comments on commit 964b19f

Please sign in to comment.