mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
sched: Fix potential NULL derference of doms_cur
If CONFIG_CPUMASK_OFFSTACK is enabled but doms_cur alloc failed in arch_init_sched_domains(), doms_cur will move back to fallback_doms. But this time, fallback_doms has not been initialized yet. Signed-off-by: Yong Zhang <[email protected]> Cc: [email protected] LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
89f19f04dc
commit
cb5fd13f11
1 changed files with 1 additions and 1 deletions
|
|
@ -9165,6 +9165,7 @@ void __init sched_init_smp(void)
|
|||
cpumask_var_t non_isolated_cpus;
|
||||
|
||||
alloc_cpumask_var(&non_isolated_cpus, GFP_KERNEL);
|
||||
alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
|
||||
|
||||
#if defined(CONFIG_NUMA)
|
||||
sched_group_nodes_bycpu = kzalloc(nr_cpu_ids * sizeof(void **),
|
||||
|
|
@ -9196,7 +9197,6 @@ void __init sched_init_smp(void)
|
|||
sched_init_granularity();
|
||||
free_cpumask_var(non_isolated_cpus);
|
||||
|
||||
alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
|
||||
init_sched_rt_class();
|
||||
}
|
||||
#else
|
||||
|
|
|
|||
Loading…
Reference in a new issue