lkml.org 
[lkml]   [2011]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] [240/275] SUNRPC: Never reuse the socket port after an xs_close()
Date
2.6.35-longterm review patch.  If anyone has any objections, please let me know.

------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>

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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>

---
net/sunrpc/xprtsock.c | 2 ++
1 file changed, 2 insertions(+)

Index: linux-2.6.35.y/net/sunrpc/xprtsock.c
===================================================================
--- linux-2.6.35.y.orig/net/sunrpc/xprtsock.c 2011-03-29 22:50:17.446811999 -0700
+++ linux-2.6.35.y/net/sunrpc/xprtsock.c 2011-03-29 23:03:03.211218003 -0700
@@ -710,6 +710,8 @@
if (sk == NULL)
return;

+ transport->srcport = 0;
+
write_lock_bh(&sk->sk_callback_lock);
transport->inet = NULL;
transport->sock = NULL;

\
 
 \ /
  Last update: 2011-03-30 23:19    [from the cache]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site