projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3c0a2e0
)
NFSv4: Fix memory leak in nfs4_set_security_label
author
Dmitry Mastykin
<mastichi@gmail.com>
Wed, 22 May 2024 07:45:24 +0000
(10:45 +0300)
committer
Trond Myklebust
<trond.myklebust@hammerspace.com>
Wed, 22 May 2024 15:27:04 +0000
(11:27 -0400)
We leak nfs_fattr and nfs4_label every time we set a security xattr.
Signed-off-by: Dmitry Mastykin <mastichi@gmail.com>
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/nfs4proc.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/nfs4proc.c
b/fs/nfs/nfs4proc.c
index c93c12063b3af207f61f7d7572481d4fc439b0aa..94c07875aa3f42c4543c6409a881739bfcaf7dfb 100644
(file)
--- a/
fs/nfs/nfs4proc.c
+++ b/
fs/nfs/nfs4proc.c
@@
-6268,6
+6268,7
@@
nfs4_set_security_label(struct inode *inode, const void *buf, size_t buflen)
if (status == 0)
nfs_setsecurity(inode, fattr);
+ nfs_free_fattr(fattr);
return status;
}
#endif /* CONFIG_NFS_V4_SECURITY_LABEL */