mac80211: clean up sta_info_destroy() users wrt. RCU/locking
Calling sta_info_destroy() doesn't require RCU-synchronisation before-hand because it does that internally. However, it does require rtnl-locking so insert that where necessary. Also clean up the code doing it internally to be a bit clearer and not synchronize twice if keys are configured. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
committed by
John W. Linville
parent
93e5deb1ae
commit
4f6fab472c
@@ -700,11 +700,7 @@ static int ieee80211_del_station(struct wiphy *wiphy, struct net_device *dev,
|
||||
return -ENOENT;
|
||||
|
||||
sta_info_unlink(&sta);
|
||||
|
||||
if (sta) {
|
||||
synchronize_rcu();
|
||||
sta_info_destroy(sta);
|
||||
}
|
||||
sta_info_destroy(sta);
|
||||
} else
|
||||
sta_info_flush(local, sdata);
|
||||
|
||||
|
Reference in New Issue
Block a user