mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 01:33:00 -04:00
[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 <[email protected]> Cc: Thomas Gleixner <[email protected]> Acked-by: Ingo Molnar <[email protected]> Signed-off-by: Heiko Carstens <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a04b61d3dc
commit
b50f60ceee
1 changed files with 5 additions and 0 deletions
|
|
@ -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:
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue