diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-07-30 06:03:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-07-31 16:28:41 -0400 |
commit | b50f60ceeef2e38e529737c0260d9543939915ad (patch) | |
tree | 608880dd1c9d1751eceea9f21f7f1d2898ea917f /kernel | |
parent | a04b61d3dc68857dcc81a5761268c96056742fb2 (diff) |
[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 <arjan@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/sched.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index de440b220b4c..a2be2d055299 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6766,6 +6766,11 @@ void __init sched_init(void) | |||
6766 | } | 6766 | } |
6767 | 6767 | ||
6768 | set_load_weight(&init_task); | 6768 | set_load_weight(&init_task); |
6769 | |||
6770 | #ifdef CONFIG_RT_MUTEXES | ||
6771 | plist_head_init(&init_task.pi_waiters, &init_task.pi_lock); | ||
6772 | #endif | ||
6773 | |||
6769 | /* | 6774 | /* |
6770 | * The boot idle thread does lazy MMU switching as well: | 6775 | * The boot idle thread does lazy MMU switching as well: |
6771 | */ | 6776 | */ |