linux/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 The nfsd update this round is mainly a lot of miscellaneous cleanups and 2017-02-28 15:39:09 -08:00
xprtrdma xprtrdma: Delete an error message for a failed memory allocation in xprt_rdma_bc_setup() 2017-05-24 07:53:37 -04:00
addr.c
auth_generic.c
auth_null.c
auth_unix.c
auth.c sched/headers: Prepare to remove <linux/cred.h> inclusion from <linux/sched.h> 2017-03-02 08:42:31 +01:00
backchannel_rqst.c
cache.c NFS client updates for Linux 4.11 2017-03-01 16:10:30 -08:00
clnt.c sunrpc: don't check for failure from mempool_alloc() 2017-04-20 13:44:57 -04:00
debugfs.c
Kconfig svcrdma: Introduce local rdma_rw API helpers 2017-04-25 17:25:55 -04:00
Makefile
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_syms.c
sunrpc.h
svc_xprt.c Merge branch 'locking-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-02-20 13:23:30 -08:00
svc.c NFSv4: Fix callback server shutdown 2017-04-27 18:00:16 -04:00
svcauth_unix.c
svcauth.c
svcsock.c SUNRPC/backchanel: set XPT_CONG_CTRL flag for bc xprt 2017-03-09 15:20:46 -05:00
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