From: Christoph Lameter Date: Wed, 25 May 2011 14:47:43 +0000 (-0500) Subject: slub: Fix double bit unlock in debug mode X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a71ae47a2cbf;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git slub: Fix double bit unlock in debug mode Commit 442b06bcea23 ("slub: Remove node check in slab_free") added a call to deactivate_slab() in the debug case in __slab_alloc(), which unlocks the current slab used for allocation. Going to the label 'unlock_out' then does it again. Also, in the debug case we do not need all the other processing that the 'unlock_out' path does. We always fall back to the slow path in the debug case. So the tid update is useless. Similarly, ALLOC_SLOWPATH would just be incremented for all allocations. Also a pretty useless thing. So simply restore irq flags and return the object. Signed-off-by: Christoph Lameter Reported-and-bisected-by: James Morris Reported-by: Ingo Molnar Reported-by: Jens Axboe Cc: Pekka Enberg Signed-off-by: Linus Torvalds --- diff --git a/mm/slub.c b/mm/slub.c index 4ea7f1a22a94..4aad32d2e60d 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1884,7 +1884,8 @@ debug: deactivate_slab(s, c); c->page = NULL; c->node = NUMA_NO_NODE; - goto unlock_out; + local_irq_restore(flags); + return object; } /*