diff options
author | Simon Wunderlich <sw@simonwunderlich.de> | 2013-11-21 18:19:50 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-12-02 11:51:53 +0100 |
commit | 7ca133bc7f9dd5cee2b469eb917bd352be80a690 (patch) | |
tree | 9527f4cacef336ead7ad622d0ffa9dc237ecdc5a /net/mac80211/ieee80211_i.h | |
parent | cfg80211: protect beacon changing functions with wdev-lock (diff) | |
download | linux-7ca133bc7f9dd5cee2b469eb917bd352be80a690.tar.xz linux-7ca133bc7f9dd5cee2b469eb917bd352be80a690.zip |
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 834f0eb3e420..32bae218d6e5 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) { |