From: Heiko Carstens Looks like this was forgotten when CPU_LOCK_[ACQUIRE|RELEASE] was introduced. Cc: Pekka Enberg Cc: Srivatsa Vaddagiri Cc: Gautham Shenoy Signed-off-by: Heiko Carstens Cc: Oleg Nesterov Signed-off-by: Andrew Morton --- mm/slab.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff -puN mm/slab.c~slab-use-cpu_lock_ mm/slab.c --- a/mm/slab.c~slab-use-cpu_lock_ +++ a/mm/slab.c @@ -1182,8 +1182,10 @@ static int __cpuinit cpuup_callback(stru int memsize = sizeof(struct kmem_list3); switch (action) { - case CPU_UP_PREPARE: + case CPU_LOCK_ACQUIRE: mutex_lock(&cache_chain_mutex); + break; + case CPU_UP_PREPARE: /* * We need to do this right in the beginning since * alloc_arraycache's are going to use this list. @@ -1270,16 +1272,9 @@ static int __cpuinit cpuup_callback(stru } break; case CPU_ONLINE: - mutex_unlock(&cache_chain_mutex); start_cpu_timer(cpu); break; #ifdef CONFIG_HOTPLUG_CPU - case CPU_DOWN_PREPARE: - mutex_lock(&cache_chain_mutex); - break; - case CPU_DOWN_FAILED: - mutex_unlock(&cache_chain_mutex); - break; case CPU_DEAD: /* * Even if all the cpus of a node are down, we don't free the @@ -1350,6 +1345,8 @@ free_array_cache: continue; drain_freelist(cachep, l3, l3->free_objects); } + break; + case CPU_LOCK_RELEASE: mutex_unlock(&cache_chain_mutex); break; } _