aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorHugh Dickins <hugh.dickins@tiscali.co.uk>2009-06-06 16:18:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-06 17:33:41 -0400
commitf07502dae230a2c3b65381fd1b06e8a18b2c7525 (patch)
tree0576d509666204c8c2ad3fd023c673b46f57bf78 /fs/inode.c
parent81ee1bad86bd6752c626018d43a74e3f81f1ae72 (diff)
integrity: fix IMA inode leak
CONFIG_IMA=y inode activity leaks iint_cache and radix_tree_node objects until the system runs out of memory. Nowhere is calling ima_inode_free() a.k.a. ima_iint_delete(). Fix that by calling it from destroy_inode(). Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/inode.c b/fs/inode.c
index a4876e561953..bca0c618fdb3 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -219,6 +219,7 @@ static struct inode *alloc_inode(struct super_block *sb)
219void destroy_inode(struct inode *inode) 219void destroy_inode(struct inode *inode)
220{ 220{
221 BUG_ON(inode_has_buffers(inode)); 221 BUG_ON(inode_has_buffers(inode));
222 ima_inode_free(inode);
222 security_inode_free(inode); 223 security_inode_free(inode);
223 if (inode->i_sb->s_op->destroy_inode) 224 if (inode->i_sb->s_op->destroy_inode)
224 inode->i_sb->s_op->destroy_inode(inode); 225 inode->i_sb->s_op->destroy_inode(inode);