[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20241115093804.1634328-1-liujian56@huawei.com>
Date: Fri, 15 Nov 2024 17:38:04 +0800
From: Liu Jian <liujian56@...wei.com>
To: <trondmy@...nel.org>, <anna@...nel.org>, <chuck.lever@...cle.com>,
<jlayton@...nel.org>, <neilb@...e.de>, <okorniev@...hat.com>,
<Dai.Ngo@...cle.com>, <tom@...pey.com>, <davem@...emloft.net>,
<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
<horms@...nel.org>
CC: <linux-nfs@...r.kernel.org>, <netdev@...r.kernel.org>,
<liujian56@...wei.com>
Subject: [PATCH] sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport
Since transport->sock has been set to NULL during reset transport,
XPRT_SOCK_UPD_TIMEOUT also needs to be cleared. Otherwise, the
xs_tcp_set_socket_timeouts() may be triggered in xs_tcp_send_request()
to dereference the transport->sock that has been set to NULL.
Fixes: 7196dbb02ea0 ("SUNRPC: Allow changing of the TCP timeout parameters on the fly")
Signed-off-by: Li Lingfeng <lilingfeng3@...wei.com>
Signed-off-by: Liu Jian <liujian56@...wei.com>
---
net/sunrpc/xprtsock.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 906a1b563aee..2a7e33abe151 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -1198,6 +1198,7 @@ static void xs_sock_reset_state_flags(struct rpc_xprt *xprt)
clear_bit(XPRT_SOCK_WAKE_WRITE, &transport->sock_state);
clear_bit(XPRT_SOCK_WAKE_DISCONNECT, &transport->sock_state);
clear_bit(XPRT_SOCK_NOSPACE, &transport->sock_state);
+ clear_bit(XPRT_SOCK_UPD_TIMEOUT, &transport->sock_state);
}
static void xs_run_error_worker(struct sock_xprt *transport, unsigned int nr)
--
2.34.1
Powered by blists - more mailing lists