[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC_iWj+sO_42HYY1Twgny1kkXs-Yhfk2fPY6-ktT=Fai1qGHhA@mail.gmail.com>
Date: Tue, 20 Feb 2024 10:33:22 +0200
From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
To: Lorenzo Bianconi <lorenzo@...nel.org>
Cc: netdev@...r.kernel.org, lorenzo.bianconi@...hat.com, kuba@...nel.org,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com, hawk@...nel.org,
linyunsheng@...wei.com, toke@...hat.com, jwiedmann.dev@...il.com
Subject: Re: [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine
On Sat, 17 Feb 2024 at 13:12, Lorenzo Bianconi <lorenzo@...nel.org> wrote:
>
> Properly check page pointer returned by page_pool_dev_alloc routine in
> skb_pp_cow_data() for non-linear part of the original skb.
>
> Reported-by: Julian Wiedmann <jwiedmann.dev@...il.com>
> Closes: https://lore.kernel.org/netdev/cover.1707729884.git.lorenzo@kernel.org/T/#m7d189b0015a7281ed9221903902490c03ed19a7a
> Fixes: e6d5dbdd20aa ("xdp: add multi-buff support for xdp running in generic mode")
> Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> ---
> net/core/skbuff.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/core/skbuff.c b/net/core/skbuff.c
> index 0d9a489e6ae1..6a810c6554eb 100644
> --- a/net/core/skbuff.c
> +++ b/net/core/skbuff.c
> @@ -950,7 +950,7 @@ int skb_pp_cow_data(struct page_pool *pool, struct sk_buff **pskb,
> truesize = size;
>
> page = page_pool_dev_alloc(pool, &page_off, &truesize);
> - if (!data) {
> + if (!page) {
> consume_skb(nskb);
> return -ENOMEM;
> }
> --
> 2.43.2
>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@...aro.org>
Powered by blists - more mailing lists