aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
authorStephen Smalley <sds@epoch.ncsc.mil>2006-02-03 08:21:12 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-03 21:31:33 -0500
commit53ea68ecea11bcbb3451c2758ce181bd97b569a9 (patch)
tree4e754db2a21db5b90a1650f2993d0b76c00cbd53 /include/linux/security.h
parent89a2fa5f2139be35e214bcf86a8291d6a1da75f2 (diff)
[PATCH] SELinux: fix size-128 slab leak
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>
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index bb1da86747c7..7cbef482e13a 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -1499,15 +1499,11 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd,
1499 1499
1500static inline int security_inode_alloc (struct inode *inode) 1500static inline int security_inode_alloc (struct inode *inode)
1501{ 1501{
1502 if (unlikely (IS_PRIVATE (inode)))
1503 return 0;
1504 return security_ops->inode_alloc_security (inode); 1502 return security_ops->inode_alloc_security (inode);
1505} 1503}
1506 1504
1507static inline void security_inode_free (struct inode *inode) 1505static inline void security_inode_free (struct inode *inode)
1508{ 1506{
1509 if (unlikely (IS_PRIVATE (inode)))
1510 return;
1511 security_ops->inode_free_security (inode); 1507 security_ops->inode_free_security (inode);
1512} 1508}
1513 1509