Patch "SUNRPC: ECONNRESET might require a rebind" has been added to the 6.1-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: ECONNRESET might require a rebind

to the 6.1-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-econnreset-might-require-a-rebind.patch
and it can be found in the queue-6.1 subdirectory.

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



commit d413b479f23492e4bdf8f962d534d66ab25f26f1
Author: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
Date:   Sun Sep 17 09:06:05 2023 -0400

    SUNRPC: ECONNRESET might require a rebind
    
    [ Upstream commit 4b09ca1508a60be30b2e3940264e93d7aeb5c97e ]
    
    If connect() is returning ECONNRESET, it usually means that nothing is
    listening on that port. If so, a rebind might be required in order to
    obtain the new port on which the RPC service is listening.
    
    Fixes: fd01b2597941 ("SUNRPC: ECONNREFUSED should cause a rebind.")
    Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c
index 2b803383c7b31..f0bbd6cb4e39b 100644
--- a/net/sunrpc/clnt.c
+++ b/net/sunrpc/clnt.c
@@ -2157,6 +2157,7 @@ call_connect_status(struct rpc_task *task)
 	task->tk_status = 0;
 	switch (status) {
 	case -ECONNREFUSED:
+	case -ECONNRESET:
 		/* A positive refusal suggests a rebind is needed. */
 		if (RPC_IS_SOFTCONN(task))
 			break;
@@ -2165,7 +2166,6 @@ call_connect_status(struct rpc_task *task)
 			goto out_retry;
 		}
 		fallthrough;
-	case -ECONNRESET:
 	case -ECONNABORTED:
 	case -ENETDOWN:
 	case -ENETUNREACH:



[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