mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
sched: Fix boot crash by zalloc()ing most of the cpu masks
I got a boot crash when forcing cpumasks offstack on 32 bit, because find_new_ilb() returned 3 on my UP system (nohz.cpu_mask wasn't zeroed). AFAICT the others need to be zeroed too: only nohz.ilb_grp_nohz_mask is initialized before use. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Cc: Peter Zijlstra <peterz@infradead.org> LKML-Reference: <200911022037.21282.rusty@rustcorp.com.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
f685ceacab
commit
49557e6203
1 changed files with 3 additions and 3 deletions
|
@ -9535,13 +9535,13 @@ void __init sched_init(void)
|
||||||
current->sched_class = &fair_sched_class;
|
current->sched_class = &fair_sched_class;
|
||||||
|
|
||||||
/* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
|
/* Allocate the nohz_cpu_mask if CONFIG_CPUMASK_OFFSTACK */
|
||||||
alloc_cpumask_var(&nohz_cpu_mask, GFP_NOWAIT);
|
zalloc_cpumask_var(&nohz_cpu_mask, GFP_NOWAIT);
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
#ifdef CONFIG_NO_HZ
|
#ifdef CONFIG_NO_HZ
|
||||||
alloc_cpumask_var(&nohz.cpu_mask, GFP_NOWAIT);
|
zalloc_cpumask_var(&nohz.cpu_mask, GFP_NOWAIT);
|
||||||
alloc_cpumask_var(&nohz.ilb_grp_nohz_mask, GFP_NOWAIT);
|
alloc_cpumask_var(&nohz.ilb_grp_nohz_mask, GFP_NOWAIT);
|
||||||
#endif
|
#endif
|
||||||
alloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT);
|
zalloc_cpumask_var(&cpu_isolated_map, GFP_NOWAIT);
|
||||||
#endif /* SMP */
|
#endif /* SMP */
|
||||||
|
|
||||||
perf_event_init();
|
perf_event_init();
|
||||||
|
|
Loading…
Reference in a new issue