Prevents a crash seen by bluhm@ while running flood ping in parallel
to looping ifconfig dwqe0 down up:
kernel: protection fault trap, code=0
Stopped at m_tag_delete_chain+0x30: movq 0(%rsi),%rax
ok kettenis@ dlg@ patrick@ deraadt@
-/* $OpenBSD: dwqe.c,v 1.17 2024/03/04 23:50:20 bluhm Exp $ */
+/* $OpenBSD: dwqe.c,v 1.18 2024/03/29 08:19:40 stsp Exp $ */
/*
* Copyright (c) 2008, 2019 Mark Kettenis <kettenis@openbsd.org>
* Copyright (c) 2017, 2022 Patrick Wildt <patrick@blueri.se>
struct dwqe_buf *txb;
int idx, txfree;
+ if ((ifp->if_flags & IFF_RUNNING) == 0)
+ return;
+
bus_dmamap_sync(sc->sc_dmat, DWQE_DMA_MAP(sc->sc_txring), 0,
DWQE_DMA_LEN(sc->sc_txring),
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);