lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 9 Jun 2013 23:29:59 -0500
From:	Calvin Owens <jcalvinowens@...il.com>
To:	johannes@...solutions.com
Cc:	linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
	jcalvinowens@...il.com
Subject: [PATCH] mac80211: Fix bogus RCU warning from ieee80211_get_tx_rates
 (Was: Re: rcu)

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@...il.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

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ