cfg80211: fix a locking bug
authorJohannes Berg <johannes@sipsolutions.net>
Fri, 10 Jul 2009 00:45:38 +0000 (02:45 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 24 Jul 2009 19:05:10 +0000 (15:05 -0400)
The cfg80211_sme_disassoc() function is already holding
a lock here that cfg80211_mlme_deauth() would take, so
it needs to use __cfg80211_mlme_deauth() instead.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/wireless/sme.c

index d635a99dba51661da071e4a0f79652b22d3950cb..10ed36621bd74653381edeb3b49c678d9bfbf4da 100644 (file)
@@ -826,8 +826,8 @@ void cfg80211_sme_disassoc(struct net_device *dev, int idx)
                return;
 
        memcpy(bssid, wdev->auth_bsses[idx]->pub.bssid, ETH_ALEN);
-       if (cfg80211_mlme_deauth(rdev, dev, bssid,
-                                NULL, 0, WLAN_REASON_DEAUTH_LEAVING)) {
+       if (__cfg80211_mlme_deauth(rdev, dev, bssid,
+                                  NULL, 0, WLAN_REASON_DEAUTH_LEAVING)) {
                /* whatever -- assume gone anyway */
                cfg80211_unhold_bss(wdev->auth_bsses[idx]);
                cfg80211_put_bss(&wdev->auth_bsses[idx]->pub);