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

From: ALOK TIWARI
Date: Sun Jun 01 2025 - 16:40:49 EST




On 02-06-2025 01:19, Mina Almasry wrote:
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://urldefense.com/v3/__https://docs.kernel.org/process/maintainer-netdev.html__;!!ACWV5N9M2RV99hQ!JPpnRT9itx84rhzAaeGelVD-bnJR8vFksx2OjGzAKZWf_A6o8hEY0CUMMUO_NuSStcCyBGnvhoJAJlADszR4D_aj$

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 for your review.

I will send v2 and add Fixes tag.
Thanks,
Alok