summaryrefslogtreecommitdiff
path: root/net/mac80211/chan.c
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-03-05 12:14:08 (GMT)
committerJohannes Berg <johannes.berg@intel.com>2014-04-09 08:55:49 (GMT)
commit4e141dad266908735967b0961c8d90187825e0bc (patch)
tree2fe457b25b558543257bb3c73d888e4f4bab8b5b /net/mac80211/chan.c
parentb6a550156bc08a472c9d2515631649e229fcfcef (diff)
downloadlinux-4e141dad266908735967b0961c8d90187825e0bc.tar.xz
mac80211: protect AP VLAN list with local->mtx
It was impossible to change chanctx of master AP for AP VLANs because the copy function requires RTNL which can't be simply taken in mac80211 code due to possible deadlocks. This is required for future chanctx reservation that re-bind vifs to new chanctx. This requires safe AP VLAN iteration without RTNL. Now VLANs can be iterated while holding either RTNL or local->mtx because the list is modified while holding both of these locks. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/chan.c')
-rw-r--r--net/mac80211/chan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 623b336..db0a3449 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -712,7 +712,7 @@ void ieee80211_vif_copy_chanctx_to_vlans(struct ieee80211_sub_if_data *sdata,
struct ieee80211_sub_if_data *vlan;
struct ieee80211_chanctx_conf *conf;
- ASSERT_RTNL();
+ lockdep_assert_held(&local->mtx);
if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_AP))
return;