From: Andy Adamson Date: Mon, 9 Jun 2014 19:33:19 +0000 (-0400) Subject: NFS check the return of nfs4_negotiate_security in nfs4_submount X-Git-Tag: v4.14-rc1~7025^2~61 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=57bbe3d7c110fcc20a661cb814a401e4126ca590;p=platform%2Fkernel%2Flinux-rpi.git NFS check the return of nfs4_negotiate_security in nfs4_submount Signed-off-by: Andy Adamson Tested-By: Steve Dickson Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4namespace.c b/fs/nfs/nfs4namespace.c index 3d5dbf8..1b86fef 100644 --- a/fs/nfs/nfs4namespace.c +++ b/fs/nfs/nfs4namespace.c @@ -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: