mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
SUNRPC: Fix Oops in xs_tcp_send_request() when transport is disconnected
If a disconnection occurs while we're trying to reply to a server
callback, then we may end up calling xs_tcp_send_request() with a NULL
value for transport->inet, which trips up the call to
tcp_sock_set_cork().
Fixes: d737e5d418
("SUNRPC: Set TCP_CORK until the transmit queue is empty")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
a421d21860
commit
d275880abc
@ -1010,6 +1010,8 @@ static int xs_tcp_send_request(struct rpc_rqst *req)
|
||||
kernel_sock_shutdown(transport->sock, SHUT_RDWR);
|
||||
return -ENOTCONN;
|
||||
}
|
||||
if (!transport->inet)
|
||||
return -ENOTCONN;
|
||||
|
||||
xs_pktdump("packet data:",
|
||||
req->rq_svec->iov_base,
|
||||
|
Loading…
Reference in New Issue
Block a user