diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-22 18:40:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-27 12:00:45 -0700 |
commit | 314cd4b8249773e4999ceae3c13796089c21e288 (patch) | |
tree | 1da9573282424302b1127667d17a12b5a6929010 | |
parent | 5460834c2384874904358ad2191f947a2d83ec72 (diff) | |
download | linux-stable-314cd4b8249773e4999ceae3c13796089c21e288.tar.gz linux-stable-314cd4b8249773e4999ceae3c13796089c21e288.tar.bz2 linux-stable-314cd4b8249773e4999ceae3c13796089c21e288.zip |
SUNRPC: Never reuse the socket port after an xs_close()
commit 246408dcd5dfeef2df437ccb0ef4d6ee87805f58 upstream.
If we call xs_close(), we're in one of two situations:
- Autoclose, which means we don't expect to resend a request
- bind+connect failed, which probably means the port is in use
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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 3ad452b00157..2e8861988801 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -710,6 +710,8 @@ static void xs_reset_transport(struct sock_xprt *transport) if (sk == NULL) return; + transport->srcport = 0; + write_lock_bh(&sk->sk_callback_lock); transport->inet = NULL; transport->sock = NULL; |