original_kernel/net/sunrpc
NeilBrown 6ea44adce9 SUNRPC: ensure correct error is reported by xs_tcp_setup_socket()
If you attempt a TCP mount from an host that is unreachable in a way
that triggers an immediate error from kernel_connect(), that error
does not propagate up, instead EAGAIN is reported.

This results in call_connect_status receiving the wrong error.

A case that it easy to demonstrate is to attempt to mount from an
address that results in ENETUNREACH, but first deleting any default
route.
Without this patch, the mount.nfs process is persistently runnable
and is hard to kill.  With this patch it exits as it should.

The problem is caused by the fact that xs_tcp_force_close() eventually
calls
      xprt_wake_pending_tasks(xprt, -EAGAIN);
which causes an error return of -EAGAIN.  so when xs_tcp_setup_sock()
calls
      xprt_wake_pending_tasks(xprt, status);
the status is ignored.

Fixes: 4efdd92c92 ("SUNRPC: Remove TCP client connection reset hack")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
2017-05-31 12:26:44 -04:00
..
auth_gss
xprtrdma xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup() 2017-05-24 07:53:37 -04:00
Kconfig svcrdma: Introduce local rdma_rw API helpers 2017-04-25 17:25:55 -04:00
Makefile
addr.c
auth.c
auth_generic.c
auth_null.c
auth_unix.c
backchannel_rqst.c
cache.c
clnt.c sunrpc: don't check for failure from mempool_alloc() 2017-04-20 13:44:57 -04:00
debugfs.c
netns.h
rpc_pipe.c
rpcb_clnt.c
sched.c sunrpc: don't check for failure from mempool_alloc() 2017-04-20 13:44:57 -04:00
socklib.c
stats.c
sunrpc.h
sunrpc_syms.c
svc.c NFSv4: Fix callback server shutdown 2017-04-27 18:00:16 -04:00
svc_xprt.c
svcauth.c
svcauth_unix.c
svcsock.c
sysctl.c
timer.c
xdr.c sunrpc: Fix xdr_init_decode_pages() documenting comment 2017-04-25 16:12:34 -04:00
xprt.c sunrpc: Export xprt_force_disconnect() 2017-04-25 16:12:16 -04:00
xprtmultipath.c
xprtsock.c SUNRPC: ensure correct error is reported by xs_tcp_setup_socket() 2017-05-31 12:26:44 -04:00