* [PATCH v1] net/core/skbuff: Check the return value of skb_copy_bits()
@ 2022-08-23 5:44 lily
2022-08-24 12:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: lily @ 2022-08-23 5:44 UTC (permalink / raw)
To: netdev, linux-kernel
Cc: davem, edumazet, kuba, pabeni, asml.silence, imagedong,
luiz.von.dentz, vasily.averin, jk, lily
skb_copy_bits() could fail, which requires a check on the return
value.
Signed-off-by: Li Zhong <floridsleeves@gmail.com>
---
net/core/skbuff.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 974bbbbe7138..5ea1d074a920 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -4205,9 +4205,8 @@ struct sk_buff *skb_segment(struct sk_buff *head_skb,
SKB_GSO_CB(nskb)->csum_start =
skb_headroom(nskb) + doffset;
} else {
- skb_copy_bits(head_skb, offset,
- skb_put(nskb, len),
- len);
+ if (skb_copy_bits(head_skb, offset, skb_put(nskb, len), len))
+ goto err;
}
continue;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] net/core/skbuff: Check the return value of skb_copy_bits()
2022-08-23 5:44 [PATCH v1] net/core/skbuff: Check the return value of skb_copy_bits() lily
@ 2022-08-24 12:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-08-24 12:20 UTC (permalink / raw)
To: lily
Cc: netdev, linux-kernel, davem, edumazet, kuba, pabeni,
asml.silence, imagedong, luiz.von.dentz, vasily.averin, jk
Hello:
This patch was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:
On Mon, 22 Aug 2022 22:44:11 -0700 you wrote:
> skb_copy_bits() could fail, which requires a check on the return
> value.
>
> Signed-off-by: Li Zhong <floridsleeves@gmail.com>
> ---
> net/core/skbuff.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
Here is the summary with links:
- [v1] net/core/skbuff: Check the return value of skb_copy_bits()
https://git.kernel.org/netdev/net/c/c624c58e08b1
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] 2+ messages in thread
end of thread, other threads:[~2022-08-24 12:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-23 5:44 [PATCH v1] net/core/skbuff: Check the return value of skb_copy_bits() lily
2022-08-24 12:20 ` 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.