summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-05-03 12:01:03 +0400
committerJohannes Berg <johannes.berg@intel.com>2013-05-17 00:38:05 +0400
commitf6b3d85f7f6d66f890862d763b2ed092c5dd4322 (patch)
tree3e6ca47a09a6ee3418aa2ab14d14d3534c2b9279 /net/mac80211
parent3670946fe2e942bcb09ec9bbc587bf305f9f97da (diff)
downloadlinux-f6b3d85f7f6d66f890862d763b2ed092c5dd4322.tar.xz
mac80211: fix spurious RCU warning and update documentation
Document rx vs tx status concurrency requirements. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/rate.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 0d51877efdb7..d3f414fe67e0 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -688,8 +688,15 @@ int rate_control_set_rates(struct ieee80211_hw *hw,
struct ieee80211_sta *pubsta,
struct ieee80211_sta_rates *rates)
{
- struct ieee80211_sta_rates *old = rcu_dereference(pubsta->rates);
+ struct ieee80211_sta_rates *old;
+ /*
+ * mac80211 guarantees that this function will not be called
+ * concurrently, so the following RCU access is safe, even without
+ * extra locking. This can not be checked easily, so we just set
+ * the condition to true.
+ */
+ old = rcu_dereference_protected(pubsta->rates, true);
rcu_assign_pointer(pubsta->rates, rates);
if (old)
kfree_rcu(old, rcu_head);