From: stsp Date: Thu, 8 Feb 2024 11:16:49 +0000 (+0000) Subject: fix use of uninitialized variable m in qwx_dp_rx_reap_mon_status_ring() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9f5ff1cee7f4238d4c03aff13e01fdbdb58f77d0;p=openbsd fix use of uninitialized variable m in qwx_dp_rx_reap_mon_status_ring() Found by jsg@ --- diff --git a/sys/dev/ic/qwx.c b/sys/dev/ic/qwx.c index 6d4527720cf..4034a7ca719 100644 --- a/sys/dev/ic/qwx.c +++ b/sys/dev/ic/qwx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qwx.c,v 1.21 2024/02/08 11:13:01 stsp Exp $ */ +/* $OpenBSD: qwx.c,v 1.22 2024/02/08 11:16:49 stsp Exp $ */ /* * Copyright 2023 Stefan Sperling @@ -15498,9 +15498,9 @@ qwx_dp_rx_reap_mon_status_ring(struct qwx_softc *sc, int mac_id, } bus_dmamap_sync(sc->sc_dmat, rx_data->map, 0, - m->m_pkthdr.len, BUS_DMASYNC_POSTREAD); + rx_data->m->m_pkthdr.len, BUS_DMASYNC_POSTREAD); - tlv = mtod(m, struct hal_tlv_hdr *); + tlv = mtod(rx_data->m, struct hal_tlv_hdr *); if (FIELD_GET(HAL_TLV_HDR_TAG, tlv->tl) != HAL_RX_STATUS_BUFFER_DONE) { printf("%s: mon status DONE not set %lx, "