diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2011-11-28 15:12:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-05 03:44:00 -0500 |
commit | 52cef189165d74a5d6030184a8e05595194c69ca (patch) | |
tree | c7c4c612d14d9d6bdb24fda2725cb3da09badfed /mm | |
parent | 8e8da023f5af71662867729db5547dc54786093c (diff) |
slab, lockdep: Fix silly bug
Commit 30765b92 ("slab, lockdep: Annotate the locks before using
them") moves the init_lock_keys() call from after g_cpucache_up =
FULL, to before it. And overlooks the fact that init_node_lock_keys()
tests for it and ignores everything !FULL.
Introduce a LATE stage and change the lockdep test to be <LATE.
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/slab.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -595,6 +595,7 @@ static enum { | |||
595 | PARTIAL_AC, | 595 | PARTIAL_AC, |
596 | PARTIAL_L3, | 596 | PARTIAL_L3, |
597 | EARLY, | 597 | EARLY, |
598 | LATE, | ||
598 | FULL | 599 | FULL |
599 | } g_cpucache_up; | 600 | } g_cpucache_up; |
600 | 601 | ||
@@ -671,7 +672,7 @@ static void init_node_lock_keys(int q) | |||
671 | { | 672 | { |
672 | struct cache_sizes *s = malloc_sizes; | 673 | struct cache_sizes *s = malloc_sizes; |
673 | 674 | ||
674 | if (g_cpucache_up != FULL) | 675 | if (g_cpucache_up < LATE) |
675 | return; | 676 | return; |
676 | 677 | ||
677 | for (s = malloc_sizes; s->cs_size != ULONG_MAX; s++) { | 678 | for (s = malloc_sizes; s->cs_size != ULONG_MAX; s++) { |
@@ -1666,6 +1667,8 @@ void __init kmem_cache_init_late(void) | |||
1666 | { | 1667 | { |
1667 | struct kmem_cache *cachep; | 1668 | struct kmem_cache *cachep; |
1668 | 1669 | ||
1670 | g_cpucache_up = LATE; | ||
1671 | |||
1669 | /* Annotate slab for lockdep -- annotate the malloc caches */ | 1672 | /* Annotate slab for lockdep -- annotate the malloc caches */ |
1670 | init_lock_keys(); | 1673 | init_lock_keys(); |
1671 | 1674 | ||