[PATCH v2 08/17] net/dpaa2: fix error packet dump crash and memory leak
Stephen Hemminger
stephen at networkplumber.org
Thu Feb 26 20:23:03 CET 2026
On Thu, 26 Feb 2026 15:33:32 +0100
Maxime Leroy <maxime at leroys.fr> wrote:
> Fix three bugs in dump_err_pkts():
>
> 1. NULL pointer dereference: mbuf was checked for NULL but then
> dereferenced unconditionally on the next line.
>
> 2. Memory leak on multi-segment packets: the while loop walked
> mbuf to NULL, so the subsequent rte_pktmbuf_free(mbuf) was a
> no-op and the packet was never freed. Use a separate iterator
> variable and free the original mbuf pointer.
>
> 3. Segment index not reset between packets: variable i was
> initialized once at function scope and never reset inside the
> do/while loop, so hexdump titles had wrong segment numbers.
> Make it local to the multi-segment block.
>
> Not tested, found by code review.
>
> Fixes: 8b49427e73 ("net/dpaa2: add Rx error queue support")
> Cc: stable at dpdk.org
You need to use longer (12 character) SHAs on Fixes tags now.
Same problem in patch 14
More information about the stable
mailing list