From: Heiko Carstens Date: Sun, 30 Jul 2006 10:03:52 +0000 (-0700) Subject: [PATCH] pi-futex: missing pi_waiters plist initialization X-Git-Tag: v3.12-rc1~34385 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b50f60ceeef2e38e529737c0260d9543939915ad;p=kernel%2Fkernel-generic.git [PATCH] pi-futex: missing pi_waiters plist initialization Initialize init task's pi_waiters plist. Otherwise cpu hotplug of cpu 0 might crash, since rt_mutex_getprio() accesses an uninitialized list head. call chain which led to crash: take_cpu_down sched_idle_next __setscheduler rt_mutex_getprio Using PLIST_HEAD_INIT in the INIT_TASK macro doesn't work unfortunately, since the pi_waiters member is only conditionally present. Cc: Arjan van de Ven Cc: Thomas Gleixner Acked-by: Ingo Molnar Signed-off-by: Heiko Carstens Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/sched.c b/kernel/sched.c index de440b2..a2be2d0 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -6766,6 +6766,11 @@ void __init sched_init(void) } set_load_weight(&init_task); + +#ifdef CONFIG_RT_MUTEXES + plist_head_init(&init_task.pi_waiters, &init_task.pi_lock); +#endif + /* * The boot idle thread does lazy MMU switching as well: */