From: Hugh Dickins Date: Sat, 6 Jun 2009 20:18:09 +0000 (+0100) Subject: integrity: fix IMA inode leak X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f07502dae230a2c3b65381fd1b06e8a18b2c7525;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Signed-off-by: Linus Torvalds --- 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) void destroy_inode(struct inode *inode) { BUG_ON(inode_has_buffers(inode)); + ima_inode_free(inode); security_inode_free(inode); if (inode->i_sb->s_op->destroy_inode) inode->i_sb->s_op->destroy_inode(inode);