Skip to content

Commit 7e7be31

Browse files
committed
net: tls: fix silent data drop under pipe back-pressure
tls_sw_splice_read() uses len when advancing rxm->offset / rxm->full_len after skb_splice_bits(), rather than copied (the actual number of bytes successfully spliced into the pipe). When the destination pipe cannot accept all the requested bytes, splice_to_pipe() returns fewer bytes than len, and 'len - copied' of data is effectively skipped over. Fixes: e062fe9 ("tls: splice_read: fix accessing pre-processed records") Link: https://patch.msgid.link/20260429222944.2139041-2-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent b42f68c commit 7e7be31

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

net/tls/tls_sw.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2317,9 +2317,9 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos,
23172317
if (copied < 0)
23182318
goto splice_requeue;
23192319

2320-
if (chunk < rxm->full_len) {
2321-
rxm->offset += len;
2322-
rxm->full_len -= len;
2320+
if (copied < rxm->full_len) {
2321+
rxm->offset += copied;
2322+
rxm->full_len -= copied;
23232323
goto splice_requeue;
23242324
}
23252325

0 commit comments

Comments
 (0)