Re: [PATCH net v2] qede: Fix NULL pointer dereference in TPA fragment processing

From: Jakub Kicinski

Date: Mon Jul 27 2026 - 20:08:56 EST


Please don't post in reply to previous posting, and...

On Fri, 24 Jul 2026 19:30:44 +0530 Vaibhav Nagare wrote:
> Fix by:
> 1. Adding NULL page validation in qede_fill_frag_skb() before dereferencing
> 2. Checking error state EARLY in qede_tpa_end() before processing fragments
> 3. Checking error state in qede_tpa_cont() to skip fragment processing
>
> This allows the system to survive memory pressure by dropping packets
> instead of crashing.
>
> Fixes: 55482edc25f0 ("qede: Add slowpath/fastpath support and enable hardware GRO")
> Cc: stable@xxxxxxxxxxxxxxx
>

.. remove this empty line ..

> Signed-off-by: Vaibhav Nagare <vnagare@xxxxxxxxxx>
>

.. and the --- separator should be added here, before the change long.

> v2: Addressed AI review feedback from Simon Horman:
> - Added net_ratelimit() to prevent printk storm in NAPI fast path
> - Fixed NULL buffer recycling: check if page is valid before recycling,
> otherwise just consume the BD to prevent NULL from re-entering the ring
> - Added proper cleanup in qede_tpa_end() before early exit to prevent
> memory leaks and ring desynchronization (DMA unmap + BD recycling)
>
> v1: https://lore.kernel.org/netdev/20260709044704.141507-1-vnagare@xxxxxxxxxx/

I sent out the latest AI complaints.