diff options
author | Johannes Berg <johannes.berg@intel.com> | 2010-08-09 15:52:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-26 16:43:25 -0700 |
commit | be0fb5aa6f3155f16bb37e5941df49d0dcf7e4f9 (patch) | |
tree | 59ebb649ccaf200dd3eff4620326597bac30a991 /net | |
parent | 118fa53596b17db279814805f49d0c9202a929e1 (diff) |
cfg80211: fix locking in action frame TX
commit fe100acddf438591ecf3582cb57241e560da70b7 upstream.
Accesses to "wdev->current_bss" must be
locked with the wdev lock, which action
frame transmission is missing.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/mlme.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c index 04c6dfdeec8..007133d2d64 100644 --- a/net/wireless/mlme.c +++ b/net/wireless/mlme.c @@ -825,12 +825,18 @@ int cfg80211_mlme_action(struct cfg80211_registered_device *rdev, return -EINVAL; if (mgmt->u.action.category != WLAN_CATEGORY_PUBLIC) { /* Verify that we are associated with the destination AP */ + wdev_lock(wdev); + if (!wdev->current_bss || memcmp(wdev->current_bss->pub.bssid, mgmt->bssid, ETH_ALEN) != 0 || memcmp(wdev->current_bss->pub.bssid, mgmt->da, - ETH_ALEN) != 0) + ETH_ALEN) != 0) { + wdev_unlock(wdev); return -ENOTCONN; + } + wdev_unlock(wdev); + } if (memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0) |