mac80211: protect AP VLAN list with local->mtx
authorMichal Kazior <michal.kazior@tieto.com>
Wed, 5 Mar 2014 12:14:08 +0000 (13:14 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 9 Apr 2014 08:55:49 +0000 (10:55 +0200)
commit4e141dad266908735967b0961c8d90187825e0bc
tree2fe457b25b558543257bb3c73d888e4f4bab8b5b
parentb6a550156bc08a472c9d2515631649e229fcfcef
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>
net/mac80211/cfg.c
net/mac80211/chan.c
net/mac80211/ieee80211_i.h
net/mac80211/iface.c