]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] Fix slab BUG_ON() triggered by change in array cache size
authorAlok Kataria <alokk@calsoftinc.com>
Wed, 14 Sep 2005 19:17:53 +0000 (12:17 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 14 Sep 2005 19:31:45 +0000 (12:31 -0700)
commit166676d180b443ca1f891e577dc32bcfcd8b26ed
tree40ab6278393ebb5096d1cef7bf1e7a423f4193de
parent12cb7bdcfbd81d41a8f912a30bc059d26c68d3e2
[PATCH] Fix slab BUG_ON() triggered by change in array cache size

With the new changes that we made in the initialization of the slab
allocator, we first setup the cache from which array caches are allocated,
and then the cache, from which kmem_list3's are allocated.

Now if the array cache comes from a cache in which objsize > 32, (in this
instance size-64) then, first size-64 cache will be allocated and then the
size-128 (if this is the cache from which kmem_list3's are going to be
allocated).

So with these new changes, we are not guaranteed that we will be
initializing the malloc_sizes array in a serialized order. Thus there is
a bug in __find_general_cachep, as we are checking whether the first
cache_sizes ptr is NULL.

This is replaced by checking whether the array-cache cache is initialized.
Attached is a patch which does that.  Boots fine on a x86-64, with
DEBUG_SPIN, DEBUG_SLAB, and preempt.

Attached is a patch which does that.  Boots fine on a x86-64, with
DEBUG_SPIN, DEBUG_SLAB, and preempt.Thanks & Regards, Alok

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Shobhit Dayal <shobhitdayal.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Cc: Christoph Lameter <christoph@lameter.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/slab.c