aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorLi Zefan <lizf@cn.fujitsu.com>2008-11-04 03:20:23 -0500
committerIngo Molnar <mingo@elte.hu>2008-11-04 04:25:13 -0500
commitfaa2f98f856e89d1afb6e4a91707284d242e816e (patch)
tree3674a562130b89bf127c188102af6335cc5c4469 /kernel/sched.c
parenta17e2260926f681a0eb983c1e3cb859ba2064bce (diff)
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: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 3cb94fad33ca..213cad5e50aa 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -7767,7 +7767,7 @@ match1:
7767 ndoms_cur = 0; 7767 ndoms_cur = 0;
7768 doms_new = &fallback_doms; 7768 doms_new = &fallback_doms;
7769 cpus_andnot(doms_new[0], cpu_online_map, cpu_isolated_map); 7769 cpus_andnot(doms_new[0], cpu_online_map, cpu_isolated_map);
7770 dattr_new = NULL; 7770 WARN_ON_ONCE(dattr_new);
7771 } 7771 }
7772 7772
7773 /* Build new domains */ 7773 /* Build new domains */