diff options
author | Johannes Berg <johannes.berg@intel.com> | 2017-04-26 10:58:53 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2017-04-26 23:17:44 +0200 |
commit | 4a199068230bd8074f2e39025a2216390ea5b829 (patch) | |
tree | 88af85b1f1511f285731bb5fa6c863f60fd382fb /net/mac80211/cfg.c | |
parent | cf147085fdda044622973a12e4e06f1c753ab677 (diff) | |
download | blackbird-op-linux-4a199068230bd8074f2e39025a2216390ea5b829.tar.gz blackbird-op-linux-4a199068230bd8074f2e39025a2216390ea5b829.zip |
mac80211: disentangle iflist_mtx and chanctx_mtx
At least on iwlwifi, sometimes lockdep complains that we can
lock
chanctx_mtx -> mvm.mutex -> iflist_mtx
(due to iterate_interfaces)
and
iflist_mtx -> chanctx_mtx
Remove the latter dependency in mac80211 by using the RTNL
that we already hold in one case, and can relatively easily
achieve in the other case.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r-- | net/mac80211/cfg.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 038c31336167..e4a370b42a93 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -739,11 +739,8 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy, return 0; mutex_lock(&local->mtx); - mutex_lock(&local->iflist_mtx); if (local->use_chanctx) { - sdata = rcu_dereference_protected( - local->monitor_sdata, - lockdep_is_held(&local->iflist_mtx)); + sdata = rtnl_dereference(local->monitor_sdata); if (sdata) { ieee80211_vif_release_channel(sdata); ret = ieee80211_vif_use_channel(sdata, chandef, @@ -756,7 +753,6 @@ static int ieee80211_set_monitor_channel(struct wiphy *wiphy, if (ret == 0) local->monitor_chandef = *chandef; - mutex_unlock(&local->iflist_mtx); mutex_unlock(&local->mtx); return ret; |