From 98dd6a575928ed9c42130d208e6bfb0f7a914d5a Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Thu, 10 Apr 2008 15:36:09 +0200 Subject: 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 Signed-off-by: John W. Linville --- net/mac80211/wext.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'net/mac80211/wext.c') diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 69aed16faff..5a452575719 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 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct sta_info *sta = NULL; + rcu_read_lock(); + if (sdata->vif.type == IEEE80211_IF_TYPE_STA || sdata->vif.type == IEEE80211_IF_TYPE_IBSS) 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 wstats->qual.noise = sta->last_noise; wstats->qual.updated = local->wstats_flags; } + + rcu_read_unlock(); + return wstats; } -- cgit v1.2.3