[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130612080042.GA1695@gmail.com>
Date: Wed, 12 Jun 2013 03:00:42 -0500
From: Calvin Owens <jcalvinowens@...il.com>
To: Johannes Berg <johannes@...solutions.net>
Cc: "Luis R. Rodriguez" <mcgrof@....qualcomm.com>,
"John W. Linville" <linville@...driver.com>,
Felix Fietkau <nbd@...nwrt.org>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
ath9k-devel@...ts.ath9k.org, netdev@...r.kernel.org,
jcalvinowens@...il.com
Subject: [PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates()
Copying the rate table should be done in an RCU read-side critical
section.
Signed-off-by: Calvin Owens <jcalvinowens@...il.com>
---
net/mac80211/rate.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index d3f414f..090d9b0 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -538,6 +538,8 @@ static void rate_control_fill_sta_table(struct ieee80211_sta *sta,
struct ieee80211_sta_rates *ratetbl = NULL;
int i;
+ rcu_read_lock();
+
if (sta && !info->control.skip_table)
ratetbl = rcu_dereference(sta->rates);
@@ -566,6 +568,8 @@ static void rate_control_fill_sta_table(struct ieee80211_sta *sta,
if (rates[i].idx < 0 || !rates[i].count)
break;
}
+
+ rcu_read_unlock();
}
static void rate_control_apply_mask(struct ieee80211_sub_if_data *sdata,
--
1.8.2.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists