Re: REN2 [09/13] Common function to create the kmalloc array

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

 



On Fri, 11 Jan 2013, Joonsoo Kim wrote:

> In case of the SLUB, create_kmalloc_cache with @NULL break the system
> if slub_debug is used.
>
> Call flow is like as below.
> create_kmalloc_cache -> create_boot_cache -> __kmem_cache_create ->
> kmem_cache_open -> kmem_cache_flag.
> In kmem_cache_flag, strncmp is excecuted with name, that is, NULL.

Hmmm.. yes and we also need to be able to match a name there.

Subject: Fix: Always provide a name to create_boot_cache even during early boot.

Signed-off-by: Christoph Lameter <cl@xxxxxxxxx>

Index: linux/mm/slab_common.c
===================================================================
--- linux.orig/mm/slab_common.c	2013-01-14 08:40:18.085808641 -0600
+++ linux/mm/slab_common.c	2013-01-14 08:42:36.987689598 -0600
@@ -313,7 +313,7 @@ struct kmem_cache *__init create_kmalloc
 	if (!s)
 		panic("Out of memory when creating slab %s\n", name);

-	create_boot_cache(s, name, size, flags);
+	create_boot_cache(s ? s : "kmalloc", name, size, flags);
 	list_add(&s->list, &slab_caches);
 	s->refcount = 1;
 	return s;

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]