summaryrefslogtreecommitdiffstats
path: root/net/tls
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2023-12-06 15:27:05 -0800
committerJakub Kicinski <kuba@kernel.org>2023-12-07 09:52:28 -0800
commitc5a595000e2677e865a39f249c056bc05d6e55fd (patch)
tree7781149a1da6c14515d4f13e2744402aafc18835 /net/tls
parent4de75d3e6b0ece518a2e6e48c2716f1b223716d3 (diff)
downloadlinux-stable-c5a595000e2677e865a39f249c056bc05d6e55fd.tar.gz
linux-stable-c5a595000e2677e865a39f249c056bc05d6e55fd.tar.bz2
linux-stable-c5a595000e2677e865a39f249c056bc05d6e55fd.zip
net: tls, update curr on splice as well
The curr pointer must also be updated on the splice similar to how we do this for other copy types. Fixes: d829e9c4112b ("tls: convert to generic sk_msg interface") Signed-off-by: John Fastabend <john.fastabend@gmail.com> Reported-by: Jann Horn <jannh@google.com> Link: https://lore.kernel.org/r/20231206232706.374377-2-john.fastabend@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls')
-rw-r--r--net/tls/tls_sw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c
index 316f76187962..e37b4d2e2acd 100644
--- a/net/tls/tls_sw.c
+++ b/net/tls/tls_sw.c
@@ -952,6 +952,8 @@ static int tls_sw_sendmsg_splice(struct sock *sk, struct msghdr *msg,
}
sk_msg_page_add(msg_pl, page, part, off);
+ msg_pl->sg.copybreak = 0;
+ msg_pl->sg.curr = msg_pl->sg.end;
sk_mem_charge(sk, part);
*copied += part;
try_to_copy -= part;