Re: [PATCH] gve: add missing NULL check for gve_alloc_pending_packet() in TX DQO

From: Mina Almasry
Date: Sun Jun 01 2025 - 15:49:44 EST


On Sun, Jun 1, 2025 at 12:34 PM Alok Tiwari <alok.a.tiwari@xxxxxxxxxx> wrote:
>
> gve_alloc_pending_packet() can return NULL, but gve_tx_add_skb_dqo()
> did not check for this case before dereferencing the returned pointer.
>
> Add a missing NULL check to prevent a potential NULL pointer
> dereference when allocation fails.
>
> This improves robustness in low-memory scenarios.
>
> Signed-off-by: Alok Tiwari <alok.a.tiwari@xxxxxxxxxx>

Patch itself looks good to me, but if you can, please designate it to
the net tree by prefixing the patch with `[PATCH net v2]` as mentioned
in our docs:

https://docs.kernel.org/process/maintainer-netdev.html

Also, if possible, add `Fixes: commit a57e5de476be ("gve: DQO: Add TX
path")` to give it a chance to get picked up by stable trees.

With that:

Reviewed-by: Mina Almasry <almasrymina@xxxxxxxxxx>

--
Thanks,
Mina