Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
fix wrong use of TAILQ pointers in qwx
To:
tech@openbsd.org
Date:
Sat, 30 May 2026 14:59:26 +0200

Download raw body.

Thread
This code is passing wrong list head pointers to TAILQ macros.
Spotted while working on something else (will send another diff soon).

OK?
 
M  sys/dev/ic/qwx.c  |  3+  3-

1 file changed, 3 insertions(+), 3 deletions(-)

commit - a909ce865e74a511e28b42ea08c62da4ee2f2672
commit + df013094d758e1986e1a9698533920fe7c095993
blob - 8998915d177d473d0a43a3060cbd36954545ed06
blob + 2dc4ad99a17b4ea9165e041fb26d3ec5bc7bde3e
--- sys/dev/ic/qwx.c
+++ sys/dev/ic/qwx.c
@@ -16811,8 +16811,8 @@ qwx_dp_rx_process_wbm_err(struct qwx_softc *sc, int pu
 
 	if (purge) {
 		for (i = 0; i < sc->num_radios; i++) {
-			while ((msdu = TAILQ_FIRST(msdu_list))) {
-				TAILQ_REMOVE(msdu_list, msdu, entry);
+			while ((msdu = TAILQ_FIRST(&msdu_list[i]))) {
+				TAILQ_REMOVE(&msdu_list[i], msdu, entry);
 				m_freem(msdu->m);
 				msdu->m = NULL;
 			}
@@ -17633,7 +17633,7 @@ try_again:
 
 		if (purge) {
 			while ((msdu = TAILQ_FIRST(&msdu_list[i]))) {
-				TAILQ_REMOVE(msdu_list, msdu, entry);
+				TAILQ_REMOVE(&msdu_list[i], msdu, entry);
 				m_freem(msdu->m);
 				msdu->m = NULL;
 			}