On Tue, Mar 26, 2024 at 11:05:49PM +0100, Patrick Wildt wrote: > On Fri, Mar 01, 2024 at 12:00:29AM +0100, Alexander Bluhm wrote: > > Hi, > > > > When doing flood ping transmit from a machine and simultaneously > > ifconfig down/up in a loop, dwqe(4) interface driver crashes. > * Don't run TX/RX proc in case the interface is down?
The RX path already has a corresponding check. But the Tx path does not. If the problem is a race involving mbufs freed via dwqe_down() and mbufs freed via dwqe_tx_proc() then this simple tweak might help. diff /usr/src commit - 029d0a842cd8a317375b31145383409491d345e7 path + /usr/src blob - 97f874d2edf74a009a811455fbf37ca56f725eef file + sys/dev/ic/dwqe.c --- sys/dev/ic/dwqe.c +++ sys/dev/ic/dwqe.c @@ -593,6 +593,9 @@ dwqe_tx_proc(struct dwqe_softc *sc) 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); >