From: Calvin Owens <jcalvinowens@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com>,
"John W. Linville" <linville@tuxdriver.com>,
Felix Fietkau <nbd@openwrt.org>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
ath9k-devel@lists.ath9k.org, netdev@vger.kernel.org,
jcalvinowens@gmail.com
Subject: [PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates()
Date: Wed, 12 Jun 2013 03:00:42 -0500 [thread overview]
Message-ID: <20130612080042.GA1695@gmail.com> (raw)
In-Reply-To: <20130612075634.GA1649@gmail.com>
Copying the rate table should be done in an RCU read-side critical
section.
Signed-off-by: Calvin Owens <jcalvinowens@gmail.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
next prev parent reply other threads:[~2013-06-12 8:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130609225120.GA2789@gmail.com>
[not found] ` <20130610042959.GA1902@gmail.com>
[not found] ` <1370950926.8356.14.camel@jlt4.sipsolutions.net>
2013-06-11 17:13 ` [PATCH] mac80211: ath9k: Use RCU protection calling ieee80211_get_tx_rates Calvin Owens
2013-06-11 19:55 ` Johannes Berg
[not found] ` <1370980523.8356.70.camel-8Nb76shvtaUJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2013-06-12 6:37 ` Kalle Valo
2013-06-12 7:56 ` Calvin Owens
2013-06-12 8:00 ` Calvin Owens [this message]
2013-06-12 9:47 ` [PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates() Felix Fietkau
2013-06-13 15:27 ` Calvin Owens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130612080042.GA1695@gmail.com \
--to=jcalvinowens@gmail.com \
--cc=ath9k-devel@lists.ath9k.org \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=mcgrof@qca.qualcomm.com \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).