diff options
author | Christoph Lameter <cl@linux.com> | 2011-05-25 10:47:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-25 11:38:24 -0400 |
commit | a71ae47a2cbfa542c69f695809124da4e4dd9e8f (patch) | |
tree | a6b563bbab796f404fc68fdeebdf9a1c1e2fc27b | |
parent | 4a7df24ddc7097cd789a7527187826552ea0765e (diff) |
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 <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>
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1884,7 +1884,8 @@ debug: | |||
1884 | deactivate_slab(s, c); | 1884 | deactivate_slab(s, c); |
1885 | c->page = NULL; | 1885 | c->page = NULL; |
1886 | c->node = NUMA_NO_NODE; | 1886 | c->node = NUMA_NO_NODE; |
1887 | goto unlock_out; | 1887 | local_irq_restore(flags); |
1888 | return object; | ||
1888 | } | 1889 | } |
1889 | 1890 | ||
1890 | /* | 1891 | /* |