Message ID | 366861a7-87c8-4bbf-9101-69dd41021d07@kili.mountain (mailing list archive) |
---|---|
State | Accepted |
Commit | ef1bc119ceb52d22a83f72b8dfce1dd64a3cca05 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next,v2] net: fix signedness bug in skb_splice_from_iter() | expand |
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>
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>
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!
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;
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(-)