]> git.baikalelectronics.ru Git - kernel.git/commit
slub: Fix double bit unlock in debug mode
authorChristoph Lameter <cl@linux.com>
Wed, 25 May 2011 14:47:43 +0000 (09:47 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 25 May 2011 15:38:24 +0000 (08:38 -0700)
commit68ef883b12e997b24d347ebda1cfb068ac134d31
treea6b563bbab796f404fc68fdeebdf9a1c1e2fc27b
parent78bd4c7fbf4f8c82c285adb845f5873f6ab3c909
slub: Fix double bit unlock in debug mode

Commit 8c24c6092a14 ("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 <cl@linux.com>
Reported-and-bisected-by: James Morris <jmorris@namei.org>
Reported-by: Ingo Molnar <mingo@elte.hu>
Reported-by: Jens Axboe <jaxboe@fusionio.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/slub.c