提交 a71ae47a 编写于 作者: C Christoph Lameter 提交者: Linus Torvalds

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: NChristoph Lameter <cl@linux.com>
Reported-and-bisected-by: NJames Morris <jmorris@namei.org>
Reported-by: NIngo Molnar <mingo@elte.hu>
Reported-by: NJens Axboe <jaxboe@fusionio.com>
Cc: Pekka Enberg <penberg@kernel.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 4a7df24d
......@@ -1884,7 +1884,8 @@ static void *__slab_alloc(struct kmem_cache *s, gfp_t gfpflags, int node,
deactivate_slab(s, c);
c->page = NULL;
c->node = NUMA_NO_NODE;
goto unlock_out;
local_irq_restore(flags);
return object;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册