public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter()
@ 2023-05-26 13:39 Dan Carpenter
  2023-05-26 13:59 ` David Howells
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dan Carpenter @ 2023-05-26 13:39 UTC (permalink / raw)
  To: David Howells
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Alexander Duyck, Jesper Dangaard Brouer, Pavel Begunkov,
	Kees Cook, Jiri Benc, netdev, kernel-janitors

The "len" variable needs to be signed for the error handling to work
correctly.

Fixes: 2e910b95329c ("net: Add a function to splice pages into an skbuff for MSG_SPLICE_PAGES")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
v2: tidy up a style mistake in v1.

 net/core/skbuff.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 653abd8a6975..7c4338221b17 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -6931,8 +6931,8 @@ ssize_t skb_splice_from_iter(struct sk_buff *skb, struct iov_iter *iter,
 	unsigned int i;
 
 	while (iter->count > 0) {
-		ssize_t space, nr;
-		size_t off, len;
+		ssize_t space, nr, len;
+		size_t off;
 
 		ret = -EMSGSIZE;
 		space = frag_limit - skb_shinfo(skb)->nr_frags;
-- 
2.39.2


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

* Re: [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter()
  2023-05-26 13:39 [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter() Dan Carpenter
@ 2023-05-26 13:59 ` David Howells
  2023-05-26 16:10 ` Jiri Pirko
  2023-05-30  5:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: David Howells @ 2023-05-26 13:59 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: dhowells, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Alexander Duyck, Jesper Dangaard Brouer,
	Pavel Begunkov, Kees Cook, Jiri Benc, netdev, kernel-janitors

Dan Carpenter <dan.carpenter@linaro.org> wrote:

> The "len" variable needs to be signed for the error handling to work
> correctly.
> 
> Fixes: 2e910b95329c ("net: Add a function to splice pages into an skbuff for MSG_SPLICE_PAGES")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: David Howells <dhowells@redhat.com>


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

* Re: [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter()
  2023-05-26 13:39 [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter() Dan Carpenter
  2023-05-26 13:59 ` David Howells
@ 2023-05-26 16:10 ` Jiri Pirko
  2023-05-30  5:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2023-05-26 16:10 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: David Howells, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Alexander Duyck, Jesper Dangaard Brouer,
	Pavel Begunkov, Kees Cook, Jiri Benc, netdev, kernel-janitors

Fri, May 26, 2023 at 03:39:15PM CEST, dan.carpenter@linaro.org wrote:
>The "len" variable needs to be signed for the error handling to work
>correctly.
>
>Fixes: 2e910b95329c ("net: Add a function to splice pages into an skbuff for MSG_SPLICE_PAGES")
>Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Reviewed-by: Jiri Pirko <jiri@nvidia.com>

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

* Re: [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter()
  2023-05-26 13:39 [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter() Dan Carpenter
  2023-05-26 13:59 ` David Howells
  2023-05-26 16:10 ` Jiri Pirko
@ 2023-05-30  5:10 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-30  5:10 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: dhowells, davem, edumazet, kuba, pabeni, alexanderduyck, brouer,
	asml.silence, keescook, jbenc, netdev, kernel-janitors

Hello:

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

On Fri, 26 May 2023 16:39:15 +0300 you wrote:
> The "len" variable needs to be signed for the error handling to work
> correctly.
> 
> Fixes: 2e910b95329c ("net: Add a function to splice pages into an skbuff for MSG_SPLICE_PAGES")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
> v2: tidy up a style mistake in v1.
> 
> [...]

Here is the summary with links:
  - [net-next,v2] net: fix signedness bug in skb_splice_from_iter()
    https://git.kernel.org/netdev/net-next/c/ef1bc119ceb5

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:[~2023-05-30  5:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-26 13:39 [PATCH net-next v2] net: fix signedness bug in skb_splice_from_iter() Dan Carpenter
2023-05-26 13:59 ` David Howells
2023-05-26 16:10 ` Jiri Pirko
2023-05-30  5:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox