Skip to content

Commit

Permalink
NFS check the return of nfs4_negotiate_security in nfs4_submount
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Adamson <[email protected]>
Tested-By: Steve Dickson <[email protected]>
Signed-off-by: Trond Myklebust <[email protected]>
  • Loading branch information
androsadamson authored and trondmypd committed Jun 24, 2014
1 parent 6edf960 commit 57bbe3d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/nfs/nfs4namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,11 @@ struct vfsmount *nfs4_submount(struct nfs_server *server, struct dentry *dentry,
flavor = client->cl_auth->au_flavor;
else {
rpc_authflavor_t new = nfs4_negotiate_security(dir, name);
if ((int)new >= 0)
flavor = new;
if ((int)new < 0) {
mnt = ERR_PTR((int)new);
goto out;
}
flavor = new;
}
mnt = nfs_do_submount(dentry, fh, fattr, flavor);
out:
Expand Down

0 comments on commit 57bbe3d

Please sign in to comment.