summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2007-09-18 21:01:04 +0000
committersam <sam@FreeBSD.org>2007-09-18 21:01:04 +0000
commit27063b31a058816072e06f74387e19f4f8ed3ef0 (patch)
tree772febb013edd9b888401e13675bb699944c295e /sys/net80211/ieee80211_node.c
parentce0001ed0414203062948ce00b1cd6c9ac1e232e (diff)
downloadFreeBSD-src-27063b31a058816072e06f74387e19f4f8ed3ef0.zip
FreeBSD-src-27063b31a058816072e06f74387e19f4f8ed3ef0.tar.gz
Close longstanding race dropping inactive stations; grab a reference
to the node before starting the work, otherwise the node may go away before a reference is made in ieee80211_send_mgmt. Approved by: re (blanket wireless) Obtained from: Atheros
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 285c4c9..8e59b50 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1549,6 +1549,7 @@ restart:
* in case the driver takes a lock, as this can result
* in a LOR between the node lock and the driver lock.
*/
+ ieee80211_ref_node(ni);
IEEE80211_NODE_UNLOCK(nt);
if (ni->ni_associd != 0) {
IEEE80211_SEND_MGMT(ic, ni,
@@ -1556,6 +1557,7 @@ restart:
IEEE80211_REASON_AUTH_EXPIRE);
}
ieee80211_node_leave(ic, ni);
+ ieee80211_free_node(ni);
ic->ic_stats.is_node_timeout++;
goto restart;
}
OpenPOWER on IntegriCloud