* [PATCH] Fix the socket autoclose regression
@ 2016-07-14 23:02 Trond Myklebust
2016-07-14 23:03 ` [PATCH] SUNRPC: Force a close when a socket keepalive timeout occurs Trond Myklebust
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Trond Myklebust @ 2016-07-14 23:02 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-nfs
Hi Steven
Does the following patch fix the issue you reported?
Cheers
Trond
Trond Myklebust (1):
SUNRPC: Force a close when a socket keepalive timeout occurs
net/sunrpc/xprtsock.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] SUNRPC: Force a close when a socket keepalive timeout occurs
2016-07-14 23:02 [PATCH] Fix the socket autoclose regression Trond Myklebust
@ 2016-07-14 23:03 ` Trond Myklebust
2016-07-14 23:18 ` [PATCH] Fix the socket autoclose regression Steven Rostedt
2016-07-15 14:21 ` Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Trond Myklebust @ 2016-07-14 23:03 UTC (permalink / raw)
To: Steven Rostedt; +Cc: linux-nfs
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
net/sunrpc/xprtsock.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c
index 7e2b2fa189c3..19a44d844078 100644
--- a/net/sunrpc/xprtsock.c
+++ b/net/sunrpc/xprtsock.c
@@ -787,11 +787,17 @@ static void xs_error_report(struct sock *sk)
goto out;
err = -sk->sk_err;
- if (err == 0)
+ switch (err) {
+ case 0:
goto out;
- /* Is this a reset event? */
- if (sk->sk_state == TCP_CLOSE)
- xs_sock_mark_closed(xprt);
+ case -ETIMEDOUT:
+ xprt_force_disconnect(xprt);
+ break;
+ default:
+ /* Is this a reset event? */
+ if (sk->sk_state == TCP_CLOSE)
+ xs_sock_mark_closed(xprt);
+ }
dprintk("RPC: xs_error_report client %p, error=%d...\n",
xprt, -err);
trace_rpc_socket_error(xprt, sk->sk_socket, err);
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix the socket autoclose regression
2016-07-14 23:02 [PATCH] Fix the socket autoclose regression Trond Myklebust
2016-07-14 23:03 ` [PATCH] SUNRPC: Force a close when a socket keepalive timeout occurs Trond Myklebust
@ 2016-07-14 23:18 ` Steven Rostedt
2016-07-15 14:21 ` Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2016-07-14 23:18 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-nfs
On Thu, 14 Jul 2016 19:02:59 -0400
Trond Myklebust <trond.myklebust@primarydata.com> wrote:
> Hi Steven
>
> Does the following patch fix the issue you reported?
I'll see if I can try it out tomorrow. My server that has the issue is
currently in use. I'll also be traveling on Saturday, so if I can't get
to it tomorrow, I'll definitely get to it when I get back on Monday the
25th.
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Fix the socket autoclose regression
2016-07-14 23:02 [PATCH] Fix the socket autoclose regression Trond Myklebust
2016-07-14 23:03 ` [PATCH] SUNRPC: Force a close when a socket keepalive timeout occurs Trond Myklebust
2016-07-14 23:18 ` [PATCH] Fix the socket autoclose regression Steven Rostedt
@ 2016-07-15 14:21 ` Steven Rostedt
2 siblings, 0 replies; 4+ messages in thread
From: Steven Rostedt @ 2016-07-15 14:21 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-nfs
On Thu, 14 Jul 2016 19:02:59 -0400
Trond Myklebust <trond.myklebust@primarydata.com> wrote:
> Hi Steven
>
> Does the following patch fix the issue you reported?
I just tested it out, and unfortunately, even with this patch, after
the disconnect, the hidden port is still there.
# while :; do if ! netstat -tapn |grep :812; then break; fi; sleep 1; done;
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
[..]
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 ESTABLISHED -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
[..]
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
tcp 0 0 192.168.23.9:812 192.168.23.22:35050 TIME_WAIT -
# unhide-tcp
Unhide-tcp 20130526
Copyright © 2013 Yago Jesus & Patrick Gouin
License GPLv3+ : GNU GPL version 3 or later
http://www.unhide-forensics.info
Used options:
[*]Starting TCP checking
Found Hidden port that not appears in ss: 812
[*]Starting UDP checking
Thanks,
-- Steve
>
> Cheers
> Trond
>
> Trond Myklebust (1):
> SUNRPC: Force a close when a socket keepalive timeout occurs
>
> net/sunrpc/xprtsock.c | 14 ++++++++++----
> 1 file changed, 10 insertions(+), 4 deletions(-)
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-07-15 14:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14 23:02 [PATCH] Fix the socket autoclose regression Trond Myklebust
2016-07-14 23:03 ` [PATCH] SUNRPC: Force a close when a socket keepalive timeout occurs Trond Myklebust
2016-07-14 23:18 ` [PATCH] Fix the socket autoclose regression Steven Rostedt
2016-07-15 14:21 ` Steven Rostedt
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.