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@xxxxxxxxx> --- 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-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html