diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2011-04-13 20:31:28 +0200 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-04-13 21:12:22 +0200 |
commit | d1a8016a2d1e75021ecc8715e3c81442d7218eb6 (patch) | |
tree | b2aaef4f3aa4566765c6e3c743c74929a7790af2 /fs/nfs | |
parent | Don't mark_inode_dirty_sync() while holding lock (diff) | |
download | linux-d1a8016a2d1e75021ecc8715e3c81442d7218eb6.tar.xz linux-d1a8016a2d1e75021ecc8715e3c81442d7218eb6.zip |
NFS: Fix infinite loop in gss_create_upcall()
There can be an infinite loop if gss_create_upcall() is called without
the userspace program running. To prevent this, we return -EACCES if
we notice that pipe_version hasn't changed (indicating that the pipe
has not been opened).
Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 9bf41eab3e46..8a03ee0689f3 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -2224,8 +2224,9 @@ static int nfs4_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle, for (i = 0; i < len; i++) { status = nfs4_lookup_root_sec(server, fhandle, info, flav_array[i]); - if (status != -EPERM) - break; + if (status == -EPERM || status == -EACCES) + continue; + break; } if (status == 0) status = nfs4_server_capabilities(server, fhandle); |