]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
SUNRPC: call xs_sock_process_cmsg for all cmsg
authorJustin Worrell <jworrell@gmail.com>
Thu, 4 Sep 2025 21:09:57 +0000 (16:09 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 19 Sep 2025 14:32:01 +0000 (16:32 +0200)
commit9339b4e75a81791e909dc928cf33d3376295abe4
treee340d1020aa3ea0a4ef085e868a5e606c596d931
parentfd00ae04c5aa059e801346ace88489d104ef3675
SUNRPC: call xs_sock_process_cmsg for all cmsg

[ Upstream commit 9559d2fffd4f9b892165eed48198a0e5cb8504e6 ]

xs_sock_recv_cmsg was failing to call xs_sock_process_cmsg for any cmsg
type other than TLS_RECORD_TYPE_ALERT (TLS_RECORD_TYPE_DATA, and other
values not handled.) Based on my reading of the previous commit
(cc5d5908: sunrpc: fix client side handling of tls alerts), it looks
like only iov_iter_revert should be conditional on TLS_RECORD_TYPE_ALERT
(but that other cmsg types should still call xs_sock_process_cmsg). On
my machine, I was unable to connect (over mtls) to an NFS share hosted
on FreeBSD. With this patch applied, I am able to mount the share again.

Fixes: cc5d59081fa2 ("sunrpc: fix client side handling of tls alerts")
Signed-off-by: Justin Worrell <jworrell@gmail.com>
Reviewed-and-tested-by: Scott Mayhew <smayhew@redhat.com>
Link: https://lore.kernel.org/r/20250904211038.12874-3-jworrell@gmail.com
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/sunrpc/xprtsock.c