aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/wext.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-04-10 09:36:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-04-16 14:53:22 -0400
commit98dd6a575928ed9c42130d208e6bfb0f7a914d5a (patch)
tree5fd946b2080a8aa68e75742ea958e768cace46cb /net/mac80211/wext.c
parent171afcd4ba093b50cd2fb33fe2371fbc1f7fd389 (diff)
mac80211: further RCU fixes
There were a few more instances of sta_info_get calls not being protected by RCU, fix them. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/wext.c')
-rw-r--r--net/mac80211/wext.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c
index 69aed16faff3..5a452575719d 100644
--- a/net/mac80211/wext.c
+++ b/net/mac80211/wext.c
@@ -980,6 +980,8 @@ static struct iw_statistics *ieee80211_get_wireless_stats(struct net_device *dev
980 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 980 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
981 struct sta_info *sta = NULL; 981 struct sta_info *sta = NULL;
982 982
983 rcu_read_lock();
984
983 if (sdata->vif.type == IEEE80211_IF_TYPE_STA || 985 if (sdata->vif.type == IEEE80211_IF_TYPE_STA ||
984 sdata->vif.type == IEEE80211_IF_TYPE_IBSS) 986 sdata->vif.type == IEEE80211_IF_TYPE_IBSS)
985 sta = sta_info_get(local, sdata->u.sta.bssid); 987 sta = sta_info_get(local, sdata->u.sta.bssid);
@@ -996,6 +998,9 @@ static struct iw_statistics *ieee80211_get_wireless_stats(struct net_device *dev
996 wstats->qual.noise = sta->last_noise; 998 wstats->qual.noise = sta->last_noise;
997 wstats->qual.updated = local->wstats_flags; 999 wstats->qual.updated = local->wstats_flags;
998 } 1000 }
1001
1002 rcu_read_unlock();
1003
999 return wstats; 1004 return wstats;
1000} 1005}
1001 1006