]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
sched: add sanity check in partition_sched_domains()
authorLi Zefan <lizf@cn.fujitsu.com>
Tue, 4 Nov 2008 08:20:23 +0000 (16:20 +0800)
committerIngo Molnar <mingo@elte.hu>
Tue, 4 Nov 2008 09:25:13 +0000 (10:25 +0100)
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>
kernel/sched.c

index 3cb94fad33cae5f3dabd8b4b2091b85b1ea9768e..213cad5e50aa48e62e94964f202e3fd4d2616420 100644 (file)
@@ -7767,7 +7767,7 @@ match1:
                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 */