[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <534146d9-53b1-4b4a-8978-206f6ad4f77e@redhat.com>
Date: Tue, 22 Jul 2025 11:32:00 +0200
From: Paolo Abeni <pabeni@...hat.com>
To: Jason Xing <kerneljasonxing@...il.com>,
Jeroen de Borst <jeroendb@...gle.com>
Cc: netdev@...r.kernel.org, hramamurthy@...gle.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, willemb@...gle.com,
Joshua Washington <joshwash@...gle.com>,
Praveen Kaligineedi <pkaligineedi@...gle.com>
Subject: Re: [PATCH net-next v2 4/5] gve: implement DQO TX datapath for AF_XDP
zero-copy
On 7/22/25 1:37 AM, Jason Xing wrote:
> On Thu, Jul 17, 2025 at 11:29 PM Jeroen de Borst <jeroendb@...gle.com> wrote:
>> +
>> + pkt = gve_alloc_pending_packet(tx);
>
> I checked gve_alloc_pending_packet() and noticed there is one slight
> chance to return NULL? If so, it will trigger a NULL dereference
> issue.
IIRC, a similar thing was already mentioned on an older patch. Still
IIRC, the trick is that there is a previous, successful call to
gve_has_avail_slots_tx_dqo() that ensures there are free TX packets
avail and operations racing in between on other CPUs could only add more
free pkts.
So the above looks safe to me.
Side note: since this looks like a recurrining topic, I guess it would
be nice a follow-up adding some comments above the relevant functions.
Thanks,
Paolo
Powered by blists - more mailing lists