summaryrefslogtreecommitdiffstats
path: root/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-12-30 23:12:37 +0100
committerJohannes Berg <johannes.berg@intel.com>2013-12-30 23:14:03 +0100
commit194ff52d42fd0b55fe0fcfbf4586ae9d7ab1f780 (patch)
treeeddb4c40ce1cc7a8aa590b1aeaf162a8a8bdba5a /net/wireless
parentmac80211: Add support for QoS mapping (diff)
downloadlinux-194ff52d42fd0b55fe0fcfbf4586ae9d7ab1f780.tar.xz
linux-194ff52d42fd0b55fe0fcfbf4586ae9d7ab1f780.zip
cfg80211/mac80211: correct qos-map locking
Since the RTNL can't always be held, use wdev/sdata locking for the qos-map dereference in mac80211. This requires cfg80211 to consistently lock it, which it was missing in one place. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r--net/wireless/util.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/util.c b/net/wireless/util.c
index 5618888853b2..329b0efb3ded 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -879,7 +879,9 @@ int cfg80211_change_iface(struct cfg80211_registered_device *rdev,
dev->ieee80211_ptr->use_4addr = false;
dev->ieee80211_ptr->mesh_id_up_len = 0;
+ wdev_lock(dev->ieee80211_ptr);
rdev_set_qos_map(rdev, dev, NULL);
+ wdev_unlock(dev->ieee80211_ptr);
switch (otype) {
case NL80211_IFTYPE_AP: