net: fix signedness bug in skb_splice_from_iter()
The "len" variable needs to be signed for the error handling to work
correctly.
Fixes: 2e910b9532
("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>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Link: https://lore.kernel.org/r/366861a7-87c8-4bbf-9101-69dd41021d07@kili.mountain
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
404621fab2
commit
ef1bc119ce
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue