Skip to content

Commit c5a5950

Browse files
jrfastabkuba-moo
authored andcommitted
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: d829e9c ("tls: convert to generic sk_msg interface") Signed-off-by: John Fastabend <[email protected]> Reported-by: Jann Horn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 4de75d3 commit c5a5950

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/tls/tls_sw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,6 +952,8 @@ static int tls_sw_sendmsg_splice(struct sock *sk, struct msghdr *msg,
952952
}
953953

954954
sk_msg_page_add(msg_pl, page, part, off);
955+
msg_pl->sg.copybreak = 0;
956+
msg_pl->sg.curr = msg_pl->sg.end;
955957
sk_mem_charge(sk, part);
956958
*copied += part;
957959
try_to_copy -= part;

0 commit comments

Comments
 (0)