diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-05 16:04:47 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2013-08-07 17:07:18 -0400 |
commit | 786615bc1ce84150ded80daea6bd9f6297f48e73 (patch) | |
tree | b16f44afbdf83df990b762ae3c08b45b88b3e25e /net/sunrpc/clnt.c | |
parent | 00326ed6442c66021cd4b5e19e80f3e2027d5d42 (diff) | |
download | op-kernel-dev-786615bc1ce84150ded80daea6bd9f6297f48e73.zip op-kernel-dev-786615bc1ce84150ded80daea6bd9f6297f48e73.tar.gz |
SUNRPC: If the rpcbind channel is disconnected, fail the call to unregister
If rpcbind causes our connection to the AF_LOCAL socket to close after
we've registered a service, then we want to be careful about reconnecting
since the mount namespace may have changed.
By simply refusing to reconnect the AF_LOCAL socket in the case of
unregister, we avoid the need to somehow save the mount namespace. While
this may lead to some services not unregistering properly, it should
be safe.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Nix <nix@esperi.org.uk>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: stable@vger.kernel.org # 3.9.x
Diffstat (limited to 'net/sunrpc/clnt.c')
-rw-r--r-- | net/sunrpc/clnt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 74f6a70..ecbc4e3 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c @@ -1660,6 +1660,10 @@ call_connect(struct rpc_task *task) task->tk_action = call_connect_status; if (task->tk_status < 0) return; + if (task->tk_flags & RPC_TASK_NOCONNECT) { + rpc_exit(task, -ENOTCONN); + return; + } xprt_connect(task); } } |