]> err.no Git - linux-2.6/commitdiff
[PATCH] SELinux: fix size-128 slab leak
authorStephen Smalley <sds@epoch.ncsc.mil>
Fri, 3 Feb 2006 13:21:12 +0000 (08:21 -0500)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 4 Feb 2006 02:31:33 +0000 (18:31 -0800)
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>
include/linux/security.h

index bb1da86747c701f410d7222e4c09f8a7e7bc9670..7cbef482e13aac4b74d66e86afa65ba1ece22d8d 100644 (file)
@@ -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);
 }