Re: slab allocators: Remove SLAB_DEBUG_INITIAL flag

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 22 Apr 2007, Andrew Morton wrote:

> This patch causes a use-uninitialised crash in the locks code.

Sigh. The only case in which the check is inverted in a constructor.

Invert the check.

Signed-off-by: Christoph Lameter <[email protected]>

Index: linux-2.6.21-rc6/fs/locks.c
===================================================================
--- linux-2.6.21-rc6.orig/fs/locks.c	2007-04-22 23:17:29.000000000 -0700
+++ linux-2.6.21-rc6/fs/locks.c	2007-04-22 23:17:45.000000000 -0700
@@ -203,7 +203,7 @@ static void init_once(void *foo, struct 
 {
 	struct file_lock *lock = (struct file_lock *) foo;
 
-	if (flags & SLAB_CTOR_CONSTRUCTOR)
+	if (!(flags & SLAB_CTOR_CONSTRUCTOR))
 		return;
 
 	locks_init_lock(lock);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux