All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine
@ 2024-02-17 11:12 Lorenzo Bianconi
  2024-02-19 17:38 ` Simon Horman
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Lorenzo Bianconi @ 2024-02-17 11:12 UTC (permalink / raw
  To: netdev
  Cc: lorenzo.bianconi, kuba, davem, edumazet, pabeni, hawk,
	ilias.apalodimas, linyunsheng, toke, jwiedmann.dev

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@gmail.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@kernel.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine
  2024-02-17 11:12 [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine Lorenzo Bianconi
@ 2024-02-19 17:38 ` Simon Horman
  2024-02-20  8:33 ` Ilias Apalodimas
  2024-02-21  2:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-02-19 17:38 UTC (permalink / raw
  To: Lorenzo Bianconi
  Cc: netdev, lorenzo.bianconi, kuba, davem, edumazet, pabeni, hawk,
	ilias.apalodimas, linyunsheng, toke, jwiedmann.dev

On Sat, Feb 17, 2024 at 12:12:14PM +0100, Lorenzo Bianconi 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@gmail.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@kernel.org>

Reviewed-by: Simon Horman <horms@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine
  2024-02-17 11:12 [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine Lorenzo Bianconi
  2024-02-19 17:38 ` Simon Horman
@ 2024-02-20  8:33 ` Ilias Apalodimas
  2024-02-21  2:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Ilias Apalodimas @ 2024-02-20  8:33 UTC (permalink / raw
  To: Lorenzo Bianconi
  Cc: netdev, lorenzo.bianconi, kuba, davem, edumazet, pabeni, hawk,
	linyunsheng, toke, jwiedmann.dev

On Sat, 17 Feb 2024 at 13:12, Lorenzo Bianconi <lorenzo@kernel.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@gmail.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@kernel.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@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine
  2024-02-17 11:12 [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine Lorenzo Bianconi
  2024-02-19 17:38 ` Simon Horman
  2024-02-20  8:33 ` Ilias Apalodimas
@ 2024-02-21  2:50 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-21  2:50 UTC (permalink / raw
  To: Lorenzo Bianconi
  Cc: netdev, lorenzo.bianconi, kuba, davem, edumazet, pabeni, hawk,
	ilias.apalodimas, linyunsheng, toke, jwiedmann.dev

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 17 Feb 2024 12:12:14 +0100 you 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@gmail.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@kernel.org>
> 
> [...]

Here is the summary with links:
  - [net-next] net: fix pointer check in skb_pp_cow_data routine
    https://git.kernel.org/netdev/net-next/c/c6a28acb1a27

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-02-21  2:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-17 11:12 [PATCH net-next] net: fix pointer check in skb_pp_cow_data routine Lorenzo Bianconi
2024-02-19 17:38 ` Simon Horman
2024-02-20  8:33 ` Ilias Apalodimas
2024-02-21  2:50 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.