]> git.baikalelectronics.ru Git - kernel.git/commit
mm/init: cpu_hotplug_init() must be initialized before SLAB
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 Jun 2009 04:18:12 +0000 (21:18 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 23 Jun 2009 04:18:12 +0000 (21:18 -0700)
commitad5f6ab0f691705ff49d1fe4968392e7a874238a
tree1ab1e09bbe7a0b33bbf19dd725172827bac5bb88
parent2e7f5e88146c9f3b071c4cf3ba5a17aa14879358
mm/init: cpu_hotplug_init() must be initialized before SLAB

SLAB uses get/put_online_cpus() which use a mutex which is itself only
initialized when cpu_hotplug_init() is called.  Currently we hang suring
boot in SLAB due to doing that too late.

Reported by James Bottomley and Sachin Sant (and possibly others).
Debugged by Benjamin Herrenschmidt.

This just removes the dynamic initialization of the data structures, and
replaces it with a static one, avoiding this dependency entirely, and
removing one unnecessary special initcall.

Tested-by: Sachin Sant <sachinp@in.ibm.com>
Tested-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Tested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/cpu.h
init/main.c
kernel/cpu.c