From: Calvin Owens <jcalvinowens@gmail.com>
To: johannes@sipsolutions.com
Cc: linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
jcalvinowens@gmail.com
Subject: [PATCH] mac80211: Fix bogus RCU warning from ieee80211_get_tx_rates (Was: Re: rcu)
Date: Sun, 9 Jun 2013 23:29:59 -0500 [thread overview]
Message-ID: <20130610042959.GA1902@gmail.com> (raw)
In-Reply-To: <20130609225120.GA2789@gmail.com>
rate_control_fill_sta_table(), whose sole caller is ieee80211_get_tx_rates(),
is guaranteed by mac80211 not to be called concurrently with
rate_control_set_rates() [1], the sole function that touches the rate table
pointer/data in struct ieee80211_sta. The RCU dereference is therefore safe.
[1]: See commit f6b3d85f7f6d6
Signed-off-by: Calvin Owens <jcalvinowens@gmail.com>
---
net/mac80211/rate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index d3f414f..585297d 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -539,7 +539,7 @@ static void rate_control_fill_sta_table(struct ieee80211_sta *sta,
int i;
if (sta && !info->control.skip_table)
- ratetbl = rcu_dereference(sta->rates);
+ ratetbl = rcu_dereference_protected(sta->rates, true);
/* Fill remaining rate slots with data from the sta rate table. */
max_rates = min_t(int, max_rates, IEEE80211_TX_RATE_TABLE_SIZE);
--
1.8.2.1
next prev parent reply other threads:[~2013-06-10 4:30 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-09 22:51 rcu Calvin Owens
2013-06-10 4:29 ` Calvin Owens [this message]
2013-06-11 11:42 ` [PATCH] mac80211: Fix bogus RCU warning from ieee80211_get_tx_rates (Was: Re: rcu) Johannes Berg
2013-06-11 17:13 ` [ath9k-devel] [PATCH] mac80211: ath9k: Use RCU protection calling ieee80211_get_tx_rates Calvin Owens
2013-06-11 17:13 ` Calvin Owens
2013-06-11 17:13 ` Calvin Owens
2013-06-11 19:55 ` [ath9k-devel] " Johannes Berg
2013-06-11 19:55 ` Johannes Berg
2013-06-11 19:55 ` Johannes Berg
2013-06-12 6:37 ` [ath9k-devel] " Kalle Valo
2013-06-12 6:37 ` Kalle Valo
2013-06-12 6:37 ` Kalle Valo
2013-06-12 6:37 ` Kalle Valo
2013-06-12 7:56 ` [ath9k-devel] " Calvin Owens
2013-06-12 7:56 ` Calvin Owens
2013-06-12 7:56 ` Calvin Owens
2013-06-12 8:00 ` [ath9k-devel] [PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates() Calvin Owens
2013-06-12 8:00 ` Calvin Owens
2013-06-12 8:00 ` Calvin Owens
2013-06-12 9:47 ` [ath9k-devel] " Felix Fietkau
2013-06-12 9:47 ` Felix Fietkau
2013-06-12 9:47 ` Felix Fietkau
2013-06-13 15:27 ` [ath9k-devel] " Calvin Owens
2013-06-13 15:27 ` Calvin Owens
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=20130610042959.GA1902@gmail.com \
--to=jcalvinowens@gmail.com \
--cc=johannes@sipsolutions.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.