Skip to content

Commit

Permalink
[PATCH] SELinux: fix size-128 slab leak
Browse files Browse the repository at this point in the history
Remove private inode tests from security_inode_alloc and security_inode_free,
as we otherwise end up leaking inode security structures for private inodes.

Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by:  Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Stephen Smalley authored and Linus Torvalds committed Feb 4, 2006
1 parent 89a2fa5 commit 53ea68e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions include/linux/security.h
Original file line number Diff line number Diff line change
Expand Up @@ -1499,15 +1499,11 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd,

static inline int security_inode_alloc (struct inode *inode)
{
if (unlikely (IS_PRIVATE (inode)))
return 0;
return security_ops->inode_alloc_security (inode);
}

static inline void security_inode_free (struct inode *inode)
{
if (unlikely (IS_PRIVATE (inode)))
return;
security_ops->inode_free_security (inode);
}

Expand Down

0 comments on commit 53ea68e

Please sign in to comment.