projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7f6607c
)
NFSv4: Fix a credential leak in _nfs4_discover_trunking()
author
Trond Myklebust
<trond.myklebust@hammerspace.com>
Thu, 27 Oct 2022 20:50:12 +0000
(16:50 -0400)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:13 +0000
(13:14 +0100)
[ Upstream commit
e83458fce080dc23c25353a1af90bfecf79c7369
]
Fixes: 4f40a5b55446 ("NFSv4: Add an fattr allocation to _nfs4_discover_trunking()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/nfs/nfs4proc.c
patch
|
blob
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index dcc0677d15463a97d85e675831c3db3bd4a8557c..3c9ed63710a96bf2cda1e7c4ad3f61ff3f7d7d15 100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-3987,7
+3987,7
@@
static int _nfs4_discover_trunking(struct nfs_server *server,
page = alloc_page(GFP_KERNEL);
if (!page)
-
return -ENOMEM
;
+
goto out_put_cred
;
locations = kmalloc(sizeof(struct nfs4_fs_locations), GFP_KERNEL);
if (!locations)
goto out_free;
@@
-4003,6
+4003,8
@@
out_free_2:
kfree(locations);
out_free:
__free_page(page);
+out_put_cred:
+ put_cred(cred);
return status;
}