summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormux <mux@FreeBSD.org>2003-07-06 14:39:45 +0000
committermux <mux@FreeBSD.org>2003-07-06 14:39:45 +0000
commitba870ee95abb577b043d605edcc99c76dd2e77af (patch)
tree67216985317f6de4fb6f76b4a80370a7576e911f /sys
parent54c3e309811c7e2e9512c4ad9df819c9021d4558 (diff)
downloadFreeBSD-src-ba870ee95abb577b043d605edcc99c76dd2e77af.zip
FreeBSD-src-ba870ee95abb577b043d605edcc99c76dd2e77af.tar.gz
Fix a bug that could cause dc(4) to m_freem() an already freed
mbuf or something that isn't an mbuf. MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/dc/if_dc.c3
-rw-r--r--sys/pci/if_dc.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 99826ac..3f47992 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -3539,7 +3539,8 @@ dc_stop(struct dc_softc *sc)
*/
for (i = 0; i < DC_TX_LIST_CNT; i++) {
if (cd->dc_tx_chain[i] != NULL) {
- if (ld->dc_tx_list[i].dc_ctl & DC_TXCTL_SETUP) {
+ if ((ld->dc_tx_list[i].dc_ctl & DC_TXCTL_SETUP) ||
+ !(ld->dc_tx_list[i].dc_ctl & DC_TXCTL_LASTFRAG)) {
cd->dc_tx_chain[i] = NULL;
continue;
}
diff --git a/sys/pci/if_dc.c b/sys/pci/if_dc.c
index 99826ac..3f47992 100644
--- a/sys/pci/if_dc.c
+++ b/sys/pci/if_dc.c
@@ -3539,7 +3539,8 @@ dc_stop(struct dc_softc *sc)
*/
for (i = 0; i < DC_TX_LIST_CNT; i++) {
if (cd->dc_tx_chain[i] != NULL) {
- if (ld->dc_tx_list[i].dc_ctl & DC_TXCTL_SETUP) {
+ if ((ld->dc_tx_list[i].dc_ctl & DC_TXCTL_SETUP) ||
+ !(ld->dc_tx_list[i].dc_ctl & DC_TXCTL_LASTFRAG)) {
cd->dc_tx_chain[i] = NULL;
continue;
}
OpenPOWER on IntegriCloud