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
..
2009-11-02 08:43:45 -06:00
2009-05-25 01:53:53 -07:00
2009-09-26 20:16:15 -07:00
2009-11-06 00:50:39 -08:00
2009-05-25 01:53:53 -07:00
2009-11-23 12:34:58 -05:00
2009-10-30 12:25:12 -07:00
2009-09-02 01:03:53 -07:00
2009-09-30 16:41:34 -07:00
2009-11-05 20:56:07 -08:00
2009-10-11 23:03:47 -07:00
2009-07-12 12:22:34 -07:00
2009-09-02 01:03:53 -07:00