[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <089fa206-1511-4fd9-bc12-f73ab8a08bb6@iogearbox.net>
Date: Tue, 26 Aug 2025 14:23:34 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Dan Carpenter <dan.carpenter@...aro.org>,
Maciej Fijalkowski <maciej.fijalkowski@...el.com>
Cc: bpf@...r.kernel.org, ast@...nel.org, andrii@...nel.org,
netdev@...r.kernel.org, magnus.karlsson@...el.com, stfomichev@...il.com,
aleksander.lobakin@...el.com, Eryk Kubanski <e.kubanski@...tner.samsung.com>
Subject: Re: [PATCH v6 bpf] xsk: fix immature cq descriptor production
On 8/26/25 10:14 AM, Dan Carpenter wrote:
> On Wed, Aug 20, 2025 at 05:44:16PM +0200, Maciej Fijalkowski wrote:
>> return ERR_PTR(err);
>>
>> skb_reserve(skb, hr);
>> +
>> + addrs = kmem_cache_zalloc(xsk_tx_generic_cache, GFP_KERNEL);
>> + if (!addrs) {
>> + kfree(skb);
>
> This needs to be kfree_skb(skb);
Oh well, good catch! Maciej, given this commit did not land yet in Linus' tree,
I can toss the commit from bpf tree assuming you send a v7?
Also, looking at xsk_build_skb(), do we similarly need to free that allocated
skb when we hit the ERR_PTR(-EOVERFLOW) ? Mentioned function has the following
in the free_err path:
if (first_frag && skb)
kfree_skb(skb);
Pls double check.
> regards,
> dan carpenter
>
>> + return ERR_PTR(-ENOMEM);
>> + }
>> +
>> + xsk_set_destructor_arg(skb, addrs);
>> }
>>
>> addr = desc->addr;
>
Powered by blists - more mailing lists