Re: [PATCH] net: nixge: fix skb leak and missing bail on DMA mapping error

Andrew Lunn
2026-04-27T02:42:15Z

On Sun, Apr 26, 2026 at 05:33:16PM -0400, kernelcoredev wrote:
> When dma_mapping_error() fires during RX buffer refill in nixge_recv(),
> the skb allocated by netdev_alloc_skb_ip_align() is never freed, and
> execution continues writing a corrupt physical address into the hardware
> descriptor ring.
>
> Fix by freeing the skb with dev_kfree_skb() and returning early.
>
> Fixes: 492caffa8a1a ("net: ethernet: nixge: Add support for National Instruments XGE netdev")
>
> Signed-off-by: kernelcoredev <sonionwhat@gmail.com>

Please read

https://docs.kernel.org/process/submitting-patches.html

In particular:

https://docs.kernel.org/process/submitting-patches.html#developer-s-certificate-of-origin-1-1

Andrew

---
pw-bot: cr