diff options
| author | Jakub Kicinski <kuba@kernel.org> | 2026-04-30 01:29:38 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-05-03 04:27:14 +0300 |
| commit | 7e7be31bfdb066c1c780dcd6b1224078fc54063f (patch) | |
| tree | 9f90b07b4c2afb94f0a84fa016fb347fc86fe45f | |
| parent | b42f68cf04260ae5b3e24cda7835d792ff35ac79 (diff) | |
| download | linux-7e7be31bfdb066c1c780dcd6b1224078fc54063f.tar.xz | |
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: e062fe99cccd ("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>
| -rw-r--r-- | net/tls/tls_sw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index 798243eabb1f..2590e855f6a5 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2317,9 +2317,9 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, if (copied < 0) goto splice_requeue; - if (chunk < rxm->full_len) { - rxm->offset += len; - rxm->full_len -= len; + if (copied < rxm->full_len) { + rxm->offset += copied; + rxm->full_len -= copied; goto splice_requeue; } |
