diff options
author | Stephen Smalley <sds@epoch.ncsc.mil> | 2006-02-03 19:57:49 -0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2006-02-09 23:20:12 -0800 |
commit | 7e52f025124c75a64a59a19b0658e47b57d11aa5 (patch) | |
tree | a16768c01e33d73bf21d762eccea7cae28eaba7d | |
parent | 05f6927d2baf0f4f82e65e35548033551d2d96d7 (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>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | include/linux/security.h | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index f7e0ae01871..203fce096d4 100644 --- a/include/linux/security.h +++ b/include/linux/security.h @@ -1437,15 +1437,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); } |