diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-08-29 19:11:21 -0700 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-08-29 19:11:21 -0700 |
commit | 099392048cd443349c50310f7fdc96070e40f4e7 (patch) | |
tree | 8c42b52313b92e363bb94fd16a7e11a85873714e /net | |
parent | 0c78789e3a030615c6650fde89546cadf40ec2cc (diff) | |
download | op-kernel-dev-099392048cd443349c50310f7fdc96070e40f4e7.zip op-kernel-dev-099392048cd443349c50310f7fdc96070e40f4e7.tar.gz |
SUNRPC: Prevent SYN+SYNACK+RST storms
Add a shutdown() call before we release the socket in order to ensure the
reset is sent before we try to reconnect.
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/xprtsock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 214ca9d..7be90bc 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -822,6 +822,8 @@ static void xs_reset_transport(struct sock_xprt *transport) if (atomic_read(&transport->xprt.swapper)) sk_clear_memalloc(sk); + kernel_sock_shutdown(sock, SHUT_RDWR); + write_lock_bh(&sk->sk_callback_lock); transport->inet = NULL; transport->sock = NULL; |