summaryrefslogtreecommitdiff
path: root/fs/nfs/super.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2013-11-13 09:08:21 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-11-13 19:21:05 -0500
commit6d769f1e1420179d1f83cf1a9cdc585b46c28545 (patch)
tree5317e2b44e41572309c5782b8796e70dedf318b2 /fs/nfs/super.c
parentd07ba8422f1e58be94cc98a1f475946dc1b89f1b (diff)
downloadlinux-6d769f1e1420179d1f83cf1a9cdc585b46c28545.tar.gz
linux-6d769f1e1420179d1f83cf1a9cdc585b46c28545.tar.xz
nfs: don't retry detect_trunking with RPC_AUTH_UNIX more than once
Currently, when we try to mount and get back NFS4ERR_CLID_IN_USE or NFS4ERR_WRONGSEC, we create a new rpc_clnt and then try the call again. There is no guarantee that doing so will work however, so we can end up retrying the call in an infinite loop. Worse yet, we create the new client using rpc_clone_client_set_auth, which creates the new client as a child of the old one. Thus, we can end up with a *very* long lineage of rpc_clnts. When we go to put all of the references to them, we can end up with a long call chain that can smash the stack as each rpc_free_client() call can recurse back into itself. This patch fixes this by simply ensuring that the SETCLIENTID call will only be retried in this situation if the last attempt did not use RPC_AUTH_UNIX. Note too that with this change, we don't need the (i > 2) check in the -EACCES case since we now have a more reliable test as to whether we should reattempt. Cc: stable@vger.kernel.org # v3.10+ Cc: Chuck Lever <chuck.lever@oracle.com> Tested-by/Acked-by: Weston Andros Adamson <dros@netapp.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/super.c')
0 files changed, 0 insertions, 0 deletions