diff options
author | Simon Wunderlich <sw@simonwunderlich.de> | 2013-11-21 17:19:50 (GMT) |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-02 10:51:53 (GMT) |
commit | 7ca133bc7f9dd5cee2b469eb917bd352be80a690 (patch) | |
tree | 9527f4cacef336ead7ad622d0ffa9dc237ecdc5a /net/mac80211/ieee80211_i.h | |
parent | c56589ed1d25ae110a5b000bc1edea8f6861348f (diff) | |
download | linux-7ca133bc7f9dd5cee2b469eb917bd352be80a690.tar.xz |
mac80211: modify beacon using sdata/wdev-lock, not rtnl lock
The csa finalize worker needs to change the beacon information (for
different modes). These are normally protected under rtnl lock, but the
csa finalize worker is called by drivers and should not acquire the RTNL
lock. Therefore change access protection for beacons to sdata/wdev lock.
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
[fix sdata_dereference]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 834f0eb..32bae21 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -813,6 +813,9 @@ static inline void sdata_unlock(struct ieee80211_sub_if_data *sdata) __release(&sdata->wdev.mtx); } +#define sdata_dereference(p, sdata) \ + rcu_dereference_protected(p, lockdep_is_held(&sdata->wdev.mtx)) + static inline void sdata_assert_lock(struct ieee80211_sub_if_data *sdata) { |