Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2007 23:58:01 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 114934 for review
Message-ID:  <200702232358.l1NNw1m3038110@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114934

Change 114934 by sam@sam_ebb on 2007/02/23 23:57:19

	Correct refcnt handling for sending a null data frame; looks
	to have been mis-merged a while ago.

Affected files ...

.. //depot/projects/wifi/sys/net80211/ieee80211_output.c#65 edit

Differences ...

==== //depot/projects/wifi/sys/net80211/ieee80211_output.c#65 (text+ko) ====

@@ -339,6 +339,10 @@
 
 /*
  * Send a null data frame to the specified node.
+ *
+ * NB: the caller is assumed to have setup a node reference
+ *     for use; this is necessary to deal with a race condition
+ *     when probing for inactive stations.
  */
 int
 ieee80211_send_nulldata(struct ieee80211_node *ni)
@@ -351,10 +355,11 @@
 	MGETHDR(m, M_NOWAIT, MT_DATA);
 	if (m == NULL) {
 		/* XXX debug msg */
+		ieee80211_unref_node(&ni);
 		ic->ic_stats.is_tx_nobuf++;
 		return ENOMEM;
 	}
-	m->m_pkthdr.rcvif = (void *) ieee80211_ref_node(ni);
+	m->m_pkthdr.rcvif = (void *) ni;
 
 	wh = mtod(m, struct ieee80211_frame *);
 	ieee80211_send_setup(ic, ni, wh,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702232358.l1NNw1m3038110>