From: Christoph Lameter Date: Fri, 22 Jul 2011 14:35:14 +0000 (-0500) Subject: slub: When allocating a new slab also prep the first object X-Git-Tag: v3.1-rc1~114^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9e577e8b46ab0c38970c0f0cd7eae62e6dffddee;p=profile%2Fivi%2Fkernel-x86-ivi.git slub: When allocating a new slab also prep the first object We need to branch to the debug code for the first object if we allocate a new slab otherwise the first object will be marked wrongly as inactive. Tested-by: Rabin Vincent Signed-off-by: Christoph Lameter Signed-off-by: Pekka Enberg --- diff --git a/mm/slub.c b/mm/slub.c index 7836b45..e842c19 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -2082,6 +2082,9 @@ new_slab: stat(s, ALLOC_SLAB); c->node = page_to_nid(page); c->page = page; + + if (kmem_cache_debug(s)) + goto debug; goto load_freelist; } if (!(gfpflags & __GFP_NOWARN) && printk_ratelimit())