summaryrefslogtreecommitdiffstats
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2017-05-25 17:00:32 +1000
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-05-31 12:26:44 -0400
commit6ea44adce91526700535b3150f77f8639ae8c82d (patch)
treeaf9e4e73092f737544f082de3e3e1e0fb8dab322 /fs/nfs/super.c
parentb49c15f97c936ef5a536821f97e4dd8568369802 (diff)
downloadlinux-6ea44adce91526700535b3150f77f8639ae8c82d.tar.bz2
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: 4efdd92c9211 ("SUNRPC: Remove TCP client connection reset hack") Signed-off-by: NeilBrown <neilb@suse.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/super.c')
0 files changed, 0 insertions, 0 deletions