summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorAlexey Gladkov <legion@kernel.org>2021-10-14 19:02:30 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-11-18 21:17:02 +0300
commit5204722a964270804d42ebda3312df807882750f (patch)
tree7d2f5c196802f57a0784330cb0ccf56defd05b9a /fs/nfs
parentd9bd9732cad66f9b13ff71d8a56959defb65f307 (diff)
downloadlinux-5204722a964270804d42ebda3312df807882750f.tar.xz
Fix user namespace leak
[ Upstream commit d5f458a979650e5ed37212f6134e4ee2b28cb6ed ] Fixes: 61ca2c4afd9d ("NFS: Only reference user namespace from nfs4idmap struct instead of cred") Signed-off-by: Alexey Gladkov <legion@kernel.org> Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4idmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/nfs4idmap.c b/fs/nfs/nfs4idmap.c
index 8d8aba305ecc..f331866dd418 100644
--- a/fs/nfs/nfs4idmap.c
+++ b/fs/nfs/nfs4idmap.c
@@ -487,7 +487,7 @@ nfs_idmap_new(struct nfs_client *clp)
err_destroy_pipe:
rpc_destroy_pipe_data(idmap->idmap_pipe);
err:
- get_user_ns(idmap->user_ns);
+ put_user_ns(idmap->user_ns);
kfree(idmap);
return error;
}