提交 53ea68ec 编写于 作者: S Stephen Smalley 提交者: Linus Torvalds

[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: NStephen Smalley <sds@tycho.nsa.gov>
Acked-by: NJames Morris <jmorris@namei.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 89a2fa5f
...@@ -1499,15 +1499,11 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd, ...@@ -1499,15 +1499,11 @@ static inline void security_sb_post_pivotroot (struct nameidata *old_nd,
static inline int security_inode_alloc (struct inode *inode) static inline int security_inode_alloc (struct inode *inode)
{ {
if (unlikely (IS_PRIVATE (inode)))
return 0;
return security_ops->inode_alloc_security (inode); return security_ops->inode_alloc_security (inode);
} }
static inline void security_inode_free (struct inode *inode) static inline void security_inode_free (struct inode *inode)
{ {
if (unlikely (IS_PRIVATE (inode)))
return;
security_ops->inode_free_security (inode); security_ops->inode_free_security (inode);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册