aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gallatin <gallatin@FreeBSD.org>2026-01-19 15:41:02 +0000
committerAndrew Gallatin <gallatin@FreeBSD.org>2026-01-19 15:45:49 +0000
commitd91ae61f8fc2dd4ab3c208f25570b91a0725e2e4 (patch)
treea9e378a456d299aa8382ee2f3b7f025c20c2afe5
parent99afbc5cc7ae8ba7b112fbafbf24ea2575a65ba4 (diff)
iflib: null out freed mbuf in iflib_txsd_free
When adding the IFLIB_GET_MBUF/FLAGS, I neglected to NULL out the mbuf in the descriptor ring. I didn't think this should matter as the I thought this code was only used when the ring was about to be freed. But I was wrong, and leaving a stale mbuf in there can cause panics. Reported by: Marek Zarychta (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292547) Fixes: 14d93f612f26 Sponsored by: Netflix
-rw-r--r--sys/net/iflib.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/iflib.c b/sys/net/iflib.c
index 5c37f199e84c..b0e4bb9470c9 100644
--- a/sys/net/iflib.c
+++ b/sys/net/iflib.c
@@ -1890,6 +1890,7 @@ iflib_txsd_free(if_ctx_t ctx, iflib_txq_t txq, int i)
bus_dmamap_unload(txq->ift_tso_buf_tag,
txq->ift_sds.ifsd_tso_map[i]);
}
+ txq->ift_sds.ifsd_m[i] = NULL;
m_freem(m);
DBG_COUNTER_INC(tx_frees);
}