All of lore.kernel.org
 help / color / mirror / Atom feed
From: Justin Worrell <jworrell@gmail.com>
To: linux-nfs@vger.kernel.org
Cc: smayhew@redhat.com, trondmy@hammerspace.com, okorniev@redhat.com,
	Justin Worrell <jworrell@gmail.com>
Subject: [PATCH v2 1/1] call xs_sock_process_cmsg for all cmsg
Date: Thu,  4 Sep 2025 09:33:00 -0500	[thread overview]
Message-ID: <20250904143302.34217-2-jworrell@gmail.com> (raw)
In-Reply-To: <20250904143302.34217-1-jworrell@gmail.com>

---
 net/sunrpc/xprtsock.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index c5f7bbf5775f..3aa987e7f072 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -407,9 +407,9 @@ xs_sock_recv_cmsg(struct socket *sock, unsigned int *msg_flags, int flags)
 	iov_iter_kvec(&msg.msg_iter, ITER_DEST, &alert_kvec, 1,
 		      alert_kvec.iov_len);
 	ret = sock_recvmsg(sock, &msg, flags);
-	if (ret > 0 &&
-	    tls_get_record_type(sock->sk, &u.cmsg) == TLS_RECORD_TYPE_ALERT) {
-		iov_iter_revert(&msg.msg_iter, ret);
+	if (ret > 0) {
+		if (tls_get_record_type(sock->sk, &u.cmsg) == TLS_RECORD_TYPE_ALERT)
+			iov_iter_revert(&msg.msg_iter, ret);
 		ret = xs_sock_process_cmsg(sock, &msg, msg_flags, &u.cmsg,
 					   -EAGAIN);
 	}
-- 
2.51.0


  reply	other threads:[~2025-09-04 14:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-02 11:58 [PATCH] xs_sock_recv_cmsg failing to call xs_sock_process_cmsg Justin Worrell
2025-09-02 16:21 ` Olga Kornievskaia
2025-09-02 20:46   ` Justin Worrell
2025-09-02 21:11     ` Olga Kornievskaia
2025-09-02 23:06       ` Justin Worrell
2025-09-03 16:39         ` Olga Kornievskaia
2025-09-03 20:54 ` Scott Mayhew
2025-09-04 14:32   ` [PATCH v2 0/1] call xs_sock_process_cmsg for all cmsg Justin Worrell
2025-09-04 14:33     ` Justin Worrell [this message]
2025-09-04 17:12     ` Scott Mayhew
2025-09-04 21:09       ` [PATCH v3] " Justin Worrell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250904143302.34217-2-jworrell@gmail.com \
    --to=jworrell@gmail.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=okorniev@redhat.com \
    --cc=smayhew@redhat.com \
    --cc=trondmy@hammerspace.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.