mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
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: e062fe99cc ("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>
This commit is contained in:
parent
b42f68cf04
commit
7e7be31bfd
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user