summaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-04 23:05:45 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-12-16 11:29:46 +0100
commitc87820784454bbf7fc63a9e7d9c36762a46f393c (patch)
tree2b46b2dded299efa1f07e41cb9ce8ac1750a0a6c /net/mac80211/sta_info.c
parentd34ba2168a3c10e7301cca06069c39865b4c3ec6 (diff)
downloadop-kernel-dev-c87820784454bbf7fc63a9e7d9c36762a46f393c.zip
op-kernel-dev-c87820784454bbf7fc63a9e7d9c36762a46f393c.tar.gz
mac80211: move synchronize_net() before sta key removal
There's no reason to do this inside the sta key removal since the keys can only be reached through the sta (and not by the driver at all) so once the sta can no longer be reached, the keys are safe. This will allow further optimisation opportunities with multiple stations. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r--net/mac80211/sta_info.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 7241f322..08e5076 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -831,7 +831,8 @@ int __must_check __sta_info_destroy(struct sta_info *sta)
rcu_access_pointer(sdata->u.vlan.sta) == sta)
RCU_INIT_POINTER(sdata->u.vlan.sta, NULL);
- /* this always calls synchronize_net() */
+ synchronize_net();
+ /* now keys can no longer be reached */
ieee80211_free_sta_keys(local, sta);
sta->dead = true;
OpenPOWER on IntegriCloud