]> git.hungrycats.org Git - linux/commit
SUNRPC: Resume receiving after a TLS control record
authorChuck Lever <cel@kernel.org>
Sat, 8 Aug 2026 15:40:12 +0000 (11:40 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:06:08 +0000 (12:06 -0500)
commit03bfe7879fa8ac500f79c62b7afd848d2e5f3e16
treeaae43637e1235129a0efd22f8f5f8d3f100ebe3f
parent560956c8d2479bbf3a215b94391d9ada2063206e
SUNRPC: Resume receiving after a TLS control record

commit 8079c660b247f282340fbe7f55cf8a354009db9e upstream.

A TLS control record delivers no payload to the RPC layer.
svc_tcp_recvfrom() clears XPT_DATA before the receive, and
svc_tcp_sock_recv_cmsg() returns -EAGAIN for the record it consumed.
Nothing marks the transport ready again. kTLS raises data_ready for
arriving TCP segments, not for records it has already decrypted. An
RPC Call queued behind an alert or a KeyUpdate waits until the client
sends more. The client blocks until its RPC timeout expires.

The receive takes only the first two octets of the record. kTLS holds
the remainder on its receive list, where each later receive takes two
octets more.

Drain a record that is not an alert, then mark the transport ready
once a control record has been consumed.

Fixes: 5e052dda121e ("SUNRPC: Recognize control messages in server-side TCP socket code")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260808-svcsock-cmsg-fixes-v3-4-62d9a631c880@kernel.org
Signed-off-by: Chuck Lever <cel@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sunrpc/svcsock.c