Skip to content

Commit 3811172

Browse files
liujian56gregkh
authored andcommitted
sunrpc: clear XPRT_SOCK_UPD_TIMEOUT when reset transport
[ Upstream commit 4db9ad8 ] 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: 7196dbb ("SUNRPC: Allow changing of the TCP timeout parameters on the fly") Signed-off-by: Li Lingfeng <[email protected]> Signed-off-by: Liu Jian <[email protected]> Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent 0659021 commit 3811172

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/sunrpc/xprtsock.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1186,6 +1186,7 @@ static void xs_sock_reset_state_flags(struct rpc_xprt *xprt)
11861186
clear_bit(XPRT_SOCK_WAKE_WRITE, &transport->sock_state);
11871187
clear_bit(XPRT_SOCK_WAKE_DISCONNECT, &transport->sock_state);
11881188
clear_bit(XPRT_SOCK_NOSPACE, &transport->sock_state);
1189+
clear_bit(XPRT_SOCK_UPD_TIMEOUT, &transport->sock_state);
11891190
}
11901191

11911192
static void xs_run_error_worker(struct sock_xprt *transport, unsigned int nr)

0 commit comments

Comments
 (0)