diff options
author | Olaf Kirch <okir@suse.de> | 2006-01-06 03:19:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:59 -0500 |
commit | 93fbf1a5de8afde08988dda3735669099dee84d0 (patch) | |
tree | 2be514a800662b94a6a879b7b53f5fab6b56dd0e /net/sunrpc | |
parent | f93ea411b73594f7d144855fd34278bcf34a9afc (diff) |
[PATCH] Keep nfsd from exiting when seeing recv() errors
I submitted this one previously - svc_tcp_recvfrom currently returns
any errors to the caller, including ECONNRESET and the like.
This is something svc_recv isn't able to deal with:
len = svsk->sk_recvfrom(rqstp);
[...]
if (len == 0 || len == -EAGAIN) {
[...]
return -EAGAIN;
}
[...]
return len;
The nfsd main loop will exit when it sees an error code other than
EAGAIN.
The following patch fixes this problem
svc_recv is not equipped to deal with error codes other than EAGAIN,
and will propagate anything else (such as ECONNRESET) up to nfsd,
causing it to exit.
Signed-off-by: Olaf Kirch <okir@suse.de>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/svcsock.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index d68eba481291..e67613e4eb18 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -1026,7 +1026,7 @@ svc_tcp_recvfrom(struct svc_rqst *rqstp) | |||
1026 | } else { | 1026 | } else { |
1027 | printk(KERN_NOTICE "%s: recvfrom returned errno %d\n", | 1027 | printk(KERN_NOTICE "%s: recvfrom returned errno %d\n", |
1028 | svsk->sk_server->sv_name, -len); | 1028 | svsk->sk_server->sv_name, -len); |
1029 | svc_sock_received(svsk); | 1029 | goto err_delete; |
1030 | } | 1030 | } |
1031 | 1031 | ||
1032 | return len; | 1032 | return len; |