Patch "SUNRPC: correct error code comment in xs_tcp_setup_socket()" has been added to the 5.4-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: correct error code comment in xs_tcp_setup_socket()

to the 5.4-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-correct-error-code-comment-in-xs_tcp_setup_so.patch
and it can be found in the queue-5.4 subdirectory.

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



commit d2e14aa4f98b46fe1e11bbff173f436f7e65f52e
Author: Calum Mackay <calum.mackay@xxxxxxxxxx>
Date:   Sat Oct 24 22:36:38 2020 +0100

    SUNRPC: correct error code comment in xs_tcp_setup_socket()
    
    [ Upstream commit 8c71139d9f84c1963b0a416941244502a20a7e52 ]
    
    This comment was introduced by commit 6ea44adce915
    ("SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()").
    
    I believe EIO was a typo at the time: it should have been EAGAIN.
    
    Subsequently, commit 0445f92c5d53 ("SUNRPC: Fix disconnection races")
    changed that to ENOTCONN.
    
    Rather than trying to keep the comment here in sync with the code in
    xprt_force_disconnect(), make the point in a non-specific way.
    
    Fixes: 6ea44adce915 ("SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()")
    Signed-off-by: Calum Mackay <calum.mackay@xxxxxxxxxx>
    Signed-off-by: Anna Schumaker <Anna.Schumaker@xxxxxxxxxx>
    Stable-dep-of: 4db9ad82a6c8 ("sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index e88b9e53dcb65..ffa9df8f16796 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -2455,10 +2455,8 @@ static void xs_tcp_setup_socket(struct work_struct *work)
 	case -EHOSTUNREACH:
 	case -EADDRINUSE:
 	case -ENOBUFS:
-		/*
-		 * xs_tcp_force_close() wakes tasks with -EIO.
-		 * We need to wake them first to ensure the
-		 * correct error code.
+		/* xs_tcp_force_close() wakes tasks with a fixed error code.
+		 * We need to wake them first to ensure the correct error code.
 		 */
 		xprt_wake_pending_tasks(xprt, status);
 		xs_tcp_force_close(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