Skip to content

Commit

Permalink
cfg80211: fix locking in action frame TX
Browse files Browse the repository at this point in the history
Accesses to "wdev->current_bss" must be
locked with the wdev lock, which action
frame transmission is missing.

Cc: stable@kernel.org [2.6.33+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Aug 9, 2010
1 parent a9fda88 commit fe100ac
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion net/wireless/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -843,13 +843,19 @@ 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 ||
(wdev->iftype == NL80211_IFTYPE_STATION &&
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)
Expand Down

0 comments on commit fe100ac

Please sign in to comment.