aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rate.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2013-07-02 08:31:48 +0200
committerJens Axboe <axboe@kernel.dk>2013-07-02 08:31:48 +0200
commit5f0e5afa0de4522abb3ea7d1369039b94e740ec5 (patch)
tree6a5be3db9ecfed8ef2150c6146f6d1e0d658ac8b /net/mac80211/rate.c
parentdrbd: Allow online change of al-stripes and al-stripe-size (diff)
parentLinux 3.10-rc7 (diff)
downloadlinux-dev-5f0e5afa0de4522abb3ea7d1369039b94e740ec5.tar.xz
linux-dev-5f0e5afa0de4522abb3ea7d1369039b94e740ec5.zip
Merge tag 'v3.10-rc7' into for-3.11/drivers
Linux 3.10-rc7 Pull this in early to avoid doing it with the bcache merge, since there are a number of changes to bcache between my old base (3.10-rc1) and the new pull request.
Diffstat (limited to 'net/mac80211/rate.c')
-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);