Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 159271
b: refs/heads/master
c: 8d8b261
h: refs/heads/master
i:
  159269: 4f8d9af
  159267: 1d7f7b9
  159263: e9b0d19
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 29, 2009
1 parent a2508ed commit 16163cf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc43b28c10855aa56f6d0bd64ec6a6d8edbcf11b
refs/heads/master: 8d8b261a5c11bd043b9b0e0c7e6c49d57611e3ae
21 changes: 17 additions & 4 deletions trunk/net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -2003,6 +2003,9 @@ static void ieee80211_sta_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
case RX_MGMT_CFG80211_ASSOC:
cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, skb->len);
break;
case RX_MGMT_CFG80211_DEAUTH:
cfg80211_send_deauth(sdata->dev, (u8 *)mgmt, skb->len, NULL);
break;
default:
WARN(1, "unexpected: %d", rma);
}
Expand Down Expand Up @@ -2498,8 +2501,13 @@ int ieee80211_mgd_deauth(struct ieee80211_sub_if_data *sdata,
}
}

/* cfg80211 should catch this... */
if (WARN_ON(!bssid)) {
/*
* cfg80211 should catch this ... but it's racy since
* we can receive a deauth frame, process it, hand it
* to cfg80211 while that's in a locked section already
* trying to tell us that the user wants to disconnect.
*/
if (!bssid) {
mutex_unlock(&ifmgd->mtx);
return -ENOLINK;
}
Expand All @@ -2524,8 +2532,13 @@ int ieee80211_mgd_disassoc(struct ieee80211_sub_if_data *sdata,

mutex_lock(&ifmgd->mtx);

/* cfg80211 should catch that */
if (WARN_ON(&ifmgd->associated->cbss != req->bss)) {
/*
* cfg80211 should catch this ... but it's racy since
* we can receive a disassoc frame, process it, hand it
* to cfg80211 while that's in a locked section already
* trying to tell us that the user wants to disconnect.
*/
if (&ifmgd->associated->cbss != req->bss) {
mutex_unlock(&ifmgd->mtx);
return -ENOLINK;
}
Expand Down

0 comments on commit 16163cf

Please sign in to comment.