/[linux-patches]/genpatches-2.6/trunk/2.6.14/1427_15.4_selinux-slab-leak.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.14/1427_15.4_selinux-slab-leak.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations) (download) (as text)
Tue Mar 14 13:34:17 2006 UTC (14 years, 8 months ago) by johnm
File MIME type: text/x-diff
File size: 1245 byte(s)
2.6.14-11, rebase against local tree
1 Re-diffed for 2.6.14.7 by Kerin Millar <kerframil@gmail.com>:
2
3 From stable-bounces@linux.kernel.org Fri Feb 3 20:04:58 2006
4 Date: Fri, 3 Feb 2006 19:57:49 -0800
5 From: Andrew Morton <akpm@osdl.org>
6 To: stable@kernel.org
7 Cc:
8 Subject: [PATCH] SELinux: fix size-128 slab leak
9
10 From: Stephen Smalley <sds@epoch.ncsc.mil>
11
12 Remove private inode tests from security_inode_alloc and security_inode_free,
13 as we otherwise end up leaking inode security structures for private inodes.
14
15 Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
16 Acked-by: James Morris <jmorris@namei.org>
17 Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 Signed-off-by: Chris Wright <chrisw@sous-sol.org>
19 ---
20
21 --- linux-2.6.14.7.orig/include/linux/security.h 2005-10-27 19:02:08.000000000 -0500
22 +++ linux-2.6.14.7/include/linux/security.h 2006-02-06 21:46:53.000000000 -0500
23 @@ -1401,15 +1401,11 @@ static inline void security_sb_post_pivo
24
25 static inline int security_inode_alloc (struct inode *inode)
26 {
27 - if (unlikely (IS_PRIVATE (inode)))
28 - return 0;
29 return security_ops->inode_alloc_security (inode);
30 }
31
32 static inline void security_inode_free (struct inode *inode)
33 {
34 - if (unlikely (IS_PRIVATE (inode)))
35 - return;
36 security_ops->inode_free_security (inode);
37 }
38

  ViewVC Help
Powered by ViewVC 1.1.20