aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpuset.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-11-19 02:38:23 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-19 02:38:23 -0500
commit198d6ba4d7f48c94f990f4604f0b3d73925e0ded (patch)
tree56bbdf8ba2553c23c8099da9344a8f1d1aba97ab /kernel/cpuset.c
parent9a57f7fabd383920585ed8b74eacd117c6551f2d (diff)
parent7f0f598a0069d1ab072375965a4b69137233169c (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/isdn/i4l/isdn_net.c fs/cifs/connect.c
Diffstat (limited to 'kernel/cpuset.c')
-rw-r--r--kernel/cpuset.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/kernel/cpuset.c b/kernel/cpuset.c
index 3e00526f52ec..81fc6791a296 100644
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -587,7 +587,6 @@ static int generate_sched_domains(cpumask_t **domains,
587 int ndoms; /* number of sched domains in result */ 587 int ndoms; /* number of sched domains in result */
588 int nslot; /* next empty doms[] cpumask_t slot */ 588 int nslot; /* next empty doms[] cpumask_t slot */
589 589
590 ndoms = 0;
591 doms = NULL; 590 doms = NULL;
592 dattr = NULL; 591 dattr = NULL;
593 csa = NULL; 592 csa = NULL;
@@ -674,10 +673,8 @@ restart:
674 * Convert <csn, csa> to <ndoms, doms> and populate cpu masks. 673 * Convert <csn, csa> to <ndoms, doms> and populate cpu masks.
675 */ 674 */
676 doms = kmalloc(ndoms * sizeof(cpumask_t), GFP_KERNEL); 675 doms = kmalloc(ndoms * sizeof(cpumask_t), GFP_KERNEL);
677 if (!doms) { 676 if (!doms)
678 ndoms = 0;
679 goto done; 677 goto done;
680 }
681 678
682 /* 679 /*
683 * The rest of the code, including the scheduler, can deal with 680 * The rest of the code, including the scheduler, can deal with
@@ -732,6 +729,13 @@ restart:
732done: 729done:
733 kfree(csa); 730 kfree(csa);
734 731
732 /*
733 * Fallback to the default domain if kmalloc() failed.
734 * See comments in partition_sched_domains().
735 */
736 if (doms == NULL)
737 ndoms = 1;
738
735 *domains = doms; 739 *domains = doms;
736 *attributes = dattr; 740 *attributes = dattr;
737 return ndoms; 741 return ndoms;