aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-22 18:40:10 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2011-03-22 18:42:33 -0400
commit246408dcd5dfeef2df437ccb0ef4d6ee87805f58 (patch)
tree681179a81ef914616f33edf83129a716081b9054
parentb8413f98f997bb3ed7327e6d7117e7e91ce010c3 (diff)
downloadkernel_samsung_espresso10-246408dcd5dfeef2df437ccb0ef4d6ee87805f58.zip
kernel_samsung_espresso10-246408dcd5dfeef2df437ccb0ef4d6ee87805f58.tar.gz
kernel_samsung_espresso10-246408dcd5dfeef2df437ccb0ef4d6ee87805f58.tar.bz2
SUNRPC: Never reuse the socket port after an xs_close()
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> Cc: stable@kernel.org
-rw-r--r--net/sunrpc/xprtsock.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index be96d42..1e336a0 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;