Patch "SUNRPC: Handle -ETIMEDOUT return from tlshd" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    SUNRPC: Handle -ETIMEDOUT return from tlshd

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     sunrpc-handle-etimedout-return-from-tlshd.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 9b058f54c6f1663c02f25eff0820eb787a1b0646
Author: Benjamin Coddington <bcodding@xxxxxxxxxx>
Date:   Tue Feb 11 12:31:57 2025 -0500

    SUNRPC: Handle -ETIMEDOUT return from tlshd
    
    [ Upstream commit 7a2f6f7687c5f7083a35317cddec5ad9fa491443 ]
    
    If the TLS handshake attempt returns -ETIMEDOUT, we currently translate
    that error into -EACCES.  This becomes problematic for cases where the RPC
    layer is attempting to re-connect in paths that don't resonably handle
    -EACCES, for example: writeback.  The RPC layer can handle -ETIMEDOUT quite
    well, however - so if the handshake returns this error let's just pass it
    along.
    
    Fixes: 75eb6af7acdf ("SUNRPC: Add a TCP-with-TLS RPC transport class")
    Signed-off-by: Benjamin Coddington <bcodding@xxxxxxxxxx>
    Signed-off-by: Anna Schumaker <anna.schumaker@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 1c4bc8234ea87..29df05879c8e9 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2561,7 +2561,15 @@ static void xs_tls_handshake_done(void *data, int status, key_serial_t peerid)
 	struct sock_xprt *lower_transport =
 				container_of(lower_xprt, struct sock_xprt, xprt);
 
-	lower_transport->xprt_err = status ? -EACCES : 0;
+	switch (status) {
+	case 0:
+	case -EACCES:
+	case -ETIMEDOUT:
+		lower_transport->xprt_err = status;
+		break;
+	default:
+		lower_transport->xprt_err = -EACCES;
+	}
 	complete(&lower_transport->handshake_done);
 	xprt_put(lower_xprt);
 }




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux