aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-27 18:13:02 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-03-27 21:53:14 -0400
commit05e9cfb408b24debb3a85fd98edbfd09dd148881 (patch)
tree47c4039701bf081a8b6e9209b65c1284f2183dd7 /fs/nfs/nfs4proc.c
parent864cf9bf99f62d2095c8e6cc3a87af80b263984e (diff)
NFSv4: Fix two infinite loops in the mount code
We can currently loop forever in nfs4_lookup_root() and in nfs41_proc_secinfo_no_name(), if the first iteration returns a NFS4ERR_DELAY or something else that causes exception.retry to get set. Reported-by: Weston Andros Adamson <dros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 45df7d4a3acc..ee9ca19457ab 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2290,11 +2290,12 @@ static int nfs4_lookup_root(struct nfs_server *server, struct nfs_fh *fhandle,
2290 switch (err) { 2290 switch (err) {
2291 case 0: 2291 case 0:
2292 case -NFS4ERR_WRONGSEC: 2292 case -NFS4ERR_WRONGSEC:
2293 break; 2293 goto out;
2294 default: 2294 default:
2295 err = nfs4_handle_exception(server, err, &exception); 2295 err = nfs4_handle_exception(server, err, &exception);
2296 } 2296 }
2297 } while (exception.retry); 2297 } while (exception.retry);
2298out:
2298 return err; 2299 return err;
2299} 2300}
2300 2301
@@ -6229,11 +6230,12 @@ nfs41_proc_secinfo_no_name(struct nfs_server *server, struct nfs_fh *fhandle,
6229 case 0: 6230 case 0:
6230 case -NFS4ERR_WRONGSEC: 6231 case -NFS4ERR_WRONGSEC:
6231 case -NFS4ERR_NOTSUPP: 6232 case -NFS4ERR_NOTSUPP:
6232 break; 6233 goto out;
6233 default: 6234 default:
6234 err = nfs4_handle_exception(server, err, &exception); 6235 err = nfs4_handle_exception(server, err, &exception);
6235 } 6236 }
6236 } while (exception.retry); 6237 } while (exception.retry);
6238out:
6237 return err; 6239 return err;
6238} 6240}
6239 6241