Commit faa2f98f authored by Li Zefan's avatar Li Zefan Committed by Ingo Molnar

sched: add sanity check in partition_sched_domains()

Impact: cleanup, add debug check

It's wrong to make dattr_new = NULL if doms_new == NULL, it introduces
memory leak if dattr_new != NULL. Fortunately dattr_new is always NULL
in this case. So remove the code and add a sanity check.
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Acked-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent a17e2260
......@@ -7767,7 +7767,7 @@ void partition_sched_domains(int ndoms_new, cpumask_t *doms_new,
ndoms_cur = 0;
doms_new = &fallback_doms;
cpus_andnot(doms_new[0], cpu_online_map, cpu_isolated_map);
dattr_new = NULL;
WARN_ON_ONCE(dattr_new);
}
/* Build new domains */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment