linux/net/sunrpc
Xiaotian Feng b292cf9ce7 sunrpc: fix peername failed on closed listener
There're some warnings of "nfsd: peername failed (err 107)!"
socket error -107 means Transport endpoint is not connected.
This warning message was outputed by svc_tcp_accept() [net/sunrpc/svcsock.c],
when kernel_getpeername returns -107. This means socket might be CLOSED.

And svc_tcp_accept was called by svc_recv() [net/sunrpc/svc_xprt.c]

        if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
        <snip>
                newxpt = xprt->xpt_ops->xpo_accept(xprt);
        <snip>

So this might happen when xprt->xpt_flags has both XPT_LISTENER and XPT_CLOSE.

Let's take a look at commit b0401d72, this commit has moved the close
processing after do recvfrom method, but this commit also introduces this
warnings, if the xpt_flags has both XPT_LISTENER and XPT_CLOSED, we should
close it, not accpet then close.

Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
Cc: J. Bruce Fields <bfields@fieldses.org>
Cc: Neil Brown <neilb@suse.de>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: stable@kernel.org
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2010-01-06 17:38:04 -05:00
..
auth_gss sunrpc: reply AUTH_BADCRED to RPCSEC_GSS with unknown service 2009-08-25 17:39:43 -04:00
xprtrdma headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
addr.c SUNRPC: Address buffer overrun in rpc_uaddr2sockaddr() 2009-11-14 08:17:04 +09:00
auth_generic.c SUNRPC: Defer the auth_gss upcall when the RPC call is asynchronous 2009-09-15 20:49:33 -04:00
auth_null.c headers: utsname.h redux 2009-09-23 18:13:10 -07:00
auth_unix.c SUNRPC: Use GFP_NOFS when allocating credentials 2008-07-09 12:08:48 -04:00
auth.c SUNRPC: Defer the auth_gss upcall when the RPC call is asynchronous 2009-09-15 20:49:33 -04:00
backchannel_rqst.c nfs41: sunrpc: xprt_alloc_bc_request() should not use spin_lock_bh() 2009-06-20 14:55:39 -04:00
bc_svc.c nfs41: Backchannel callback service helper routines 2009-06-17 14:11:28 -07:00
cache.c sunrpc/cache: avoid variable over-loading in cache_defer_req 2009-09-18 17:01:12 -04:00
clnt.c net: fix htmldocs sunrpc, clnt.c 2009-09-24 15:39:14 -07:00
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2009-04-03 15:24:35 -07:00
Makefile SUNRPC: Provide functions for managing universal addresses 2009-08-09 15:09:34 -04:00
rpc_pipe.c sunrpc/rpc_pipe: fix kernel-doc notation 2009-09-23 14:36:38 -04:00
rpcb_clnt.c SUNRPC: Eliminate PROC macro from rpcb_clnt 2009-08-09 15:09:44 -04:00
sched.c nfsd41: sunrpc: move struct rpc_buffer def into sunrpc.h 2009-09-10 12:09:06 -04:00
socklib.c SUNRPC: temp var should match return type of xdr_skb_read_actor 2008-01-30 02:05:43 -05:00
stats.c nfs41: Rename rq_received to rq_reply_bytes_recvd 2009-06-17 14:11:40 -07:00
sunrpc_syms.c SUNRPC: Ensure that sunrpc gets initialised before nfs, lockd, etc... 2009-08-21 08:17:56 -04:00
sunrpc.h nfsd41: sunrpc: Added rpc server-side backchannel handling 2009-09-11 15:04:16 -04:00
svc_xprt.c sunrpc: fix peername failed on closed listener 2010-01-06 17:38:04 -05:00
svc.c Merge commit 'linux-pnfs/nfs41-for-2.6.31' into nfsv41-for-2.6.31 2009-06-17 17:59:58 -07:00
svcauth_unix.c nfsd4: don't try to map gid's in generic rpc code 2009-10-27 19:34:43 -04:00
svcauth.c SUNRPC: The sunrpc server code should not be used by out-of-tree modules 2009-01-07 17:18:42 -05:00
svcsock.c net: fix sk_forward_alloc corruption 2009-10-30 12:25:12 -07:00
sysctl.c sysctl: remove "struct file *" argument of ->proc_handler 2009-09-24 07:21:04 -07:00
timer.c SUNRPC: Add documenting comments in net/sunrpc/timer.c 2009-08-09 15:09:47 -04:00
xdr.c sunrpc: ntoh -> be*_to_cpu 2009-08-14 13:12:52 -04:00
xprt.c nfsd41: sunrpc: Added rpc server-side backchannel handling 2009-09-11 15:04:16 -04:00
xprtsock.c NFS/RPC: fix problems with reestablish_timeout and related code. 2009-09-23 14:36:37 -04:00