aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/sched.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 2d4ff91e0c97..24012c2a8892 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -6706,7 +6706,7 @@ static int sched_domain_debug_one(struct sched_domain *sd, int cpu, int level,
6706 6706
6707static void sched_domain_debug(struct sched_domain *sd, int cpu) 6707static void sched_domain_debug(struct sched_domain *sd, int cpu)
6708{ 6708{
6709 cpumask_t *groupmask; 6709 cpumask_var_t groupmask;
6710 int level = 0; 6710 int level = 0;
6711 6711
6712 if (!sd) { 6712 if (!sd) {
@@ -6716,8 +6716,7 @@ static void sched_domain_debug(struct sched_domain *sd, int cpu)
6716 6716
6717 printk(KERN_DEBUG "CPU%d attaching sched-domain:\n", cpu); 6717 printk(KERN_DEBUG "CPU%d attaching sched-domain:\n", cpu);
6718 6718
6719 groupmask = kmalloc(sizeof(cpumask_t), GFP_KERNEL); 6719 if (!alloc_cpumask_var(&groupmask, GFP_KERNEL)) {
6720 if (!groupmask) {
6721 printk(KERN_DEBUG "Cannot load-balance (out of memory)\n"); 6720 printk(KERN_DEBUG "Cannot load-balance (out of memory)\n");
6722 return; 6721 return;
6723 } 6722 }
@@ -6730,7 +6729,7 @@ static void sched_domain_debug(struct sched_domain *sd, int cpu)
6730 if (!sd) 6729 if (!sd)
6731 break; 6730 break;
6732 } 6731 }
6733 kfree(groupmask); 6732 free_cpumask_var(groupmask);
6734} 6733}
6735#else /* !CONFIG_SCHED_DEBUG */ 6734#else /* !CONFIG_SCHED_DEBUG */
6736# define sched_domain_debug(sd, cpu) do { } while (0) 6735# define sched_domain_debug(sd, cpu) do { } while (0)