Skip to content
Commit a71ae47a authored by Christoph Lameter's avatar Christoph Lameter Committed by Linus Torvalds
Browse files

slub: Fix double bit unlock in debug mode

Commit 442b06bc

 ("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: default avatarChristoph Lameter <cl@linux.com>
Reported-and-bisected-by: default avatarJames Morris <jmorris@namei.org>
Reported-by: default avatarIngo Molnar <mingo@elte.hu>
Reported-by: default avatarJens Axboe <jaxboe@fusionio.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4a7df24d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment