Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 4 Sep 2003 14:47:19 -0700 (PDT)
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 37533 for review
Message-ID:  <200309042147.h84LlJt3050903@repoman.freebsd.org>

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

Change 37533 by sam@sam_ebb on 2003/09/04 14:46:32

	Add missing bpfdetach calls.  These potentially caused the
	driver softc to be modified after free if dhclient was
	active as the interface was detached at the 802.11 and Ethernet
	layers but not the driver.  Consequently when dhclient closed
	it's file descriptor the bpf code blindly wrote to the softc
	structure.

Affected files ...

.. //depot/projects/netperf/sys/dev/ath/if_ath.c#12 edit
.. //depot/projects/netperf/sys/dev/wi/if_wi.c#7 edit

Differences ...

==== //depot/projects/netperf/sys/dev/ath/if_ath.c#12 (text+ko) ====

@@ -332,6 +332,7 @@
 
 	mtx_lock(&sc->sc_mtx);
 	ath_stop(ifp);
+	bpfdetach(ifp);
 	ath_desc_free(sc);
 	ath_hal_detach(sc->sc_ah);
 	ieee80211_ifdetach(ifp);

==== //depot/projects/netperf/sys/dev/wi/if_wi.c#7 (text+ko) ====

@@ -506,6 +506,9 @@
 
 	wi_stop(ifp, 0);
 
+#if NBPFILTER > 0
+	bpfdetach(ifp);
+#endif
 	ieee80211_ifdetach(ifp);
 	WI_UNLOCK(sc);
 	bus_teardown_intr(dev, sc->irq, sc->wi_intrhand);



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