diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:15:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:15:13 +0000 |
commit | 98f739b627c5daa488e70dae1c8097aa78ca80ae (patch) | |
tree | afd38c73d3b6b7a6567383aeeaee0536dcdcb920 /net/core | |
parent | Adding upstream version 6.9.9. (diff) | |
download | linux-98f739b627c5daa488e70dae1c8097aa78ca80ae.tar.xz linux-98f739b627c5daa488e70dae1c8097aa78ca80ae.zip |
Adding upstream version 6.9.10.upstream/6.9.10
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/datagram.c | 3 | ||||
-rw-r--r-- | net/core/skmsg.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c index cb72923acc..99abfafb0b 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -442,11 +442,12 @@ static int __skb_datagram_iter(const struct sk_buff *skb, int offset, if (copy > len) copy = len; + n = 0; skb_frag_foreach_page(frag, skb_frag_off(frag) + offset - start, copy, p, p_off, p_len, copied) { vaddr = kmap_local_page(p); - n = INDIRECT_CALL_1(cb, simple_copy_to_iter, + n += INDIRECT_CALL_1(cb, simple_copy_to_iter, vaddr + p_off, p_len, data, to); kunmap_local(vaddr); } diff --git a/net/core/skmsg.c b/net/core/skmsg.c index fd20aae30b..bbf40b9997 100644 --- a/net/core/skmsg.c +++ b/net/core/skmsg.c @@ -434,7 +434,8 @@ int sk_msg_recvmsg(struct sock *sk, struct sk_psock *psock, struct msghdr *msg, page = sg_page(sge); if (copied + copy > len) copy = len - copied; - copy = copy_page_to_iter(page, sge->offset, copy, iter); + if (copy) + copy = copy_page_to_iter(page, sge->offset, copy, iter); if (!copy) { copied = copied ? copied : -EFAULT; goto out; |