[PATCH] sched_domain: handle kmalloc failure

Try to handle mem allocation failures in build_sched_domains by bailing out
and cleaning up thus-far allocated memory.  The patch has a direct consequence
that we disable load balancing completely (even at sibling level) upon *any*
memory allocation failure.

[Lee.Schermerhorn@hp.com: bugfix]
Signed-off-by: Srivatsa Vaddagir <vatsa@in.ibm.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Srivatsa Vaddagiri 2006-06-27 02:54:38 -07:00 committed by Linus Torvalds
parent 615052dc3b
commit 51888ca25a
2 changed files with 79 additions and 62 deletions

View file

@ -639,7 +639,7 @@ struct sched_domain {
#endif
};
extern void partition_sched_domains(cpumask_t *partition1,
extern int partition_sched_domains(cpumask_t *partition1,
cpumask_t *partition2);
/*