public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH Resend] smp:Fix use un-initialized cpumask_ipi
@ 2013-01-28  4:49 Wang YanQing
  0 siblings, 0 replies; only message in thread
From: Wang YanQing @ 2013-01-28  4:49 UTC (permalink / raw)
  To: mingo
  Cc: torvalds, linux-kernel, linux-tip-commits, akpm, hpa, paulmck,
	stable, tglx

c7b798525b50256c8084215a139fa40b0114bfcc
[smp: Fix SMP function call empty cpu mask race]
use the un-initialized variable cpumask_ipi when
enable CONFIG_CPUMASK_OFFSTACK.

Signed-off-by: Wang YanQing <udknight@gmail.com>
---
 I am sorry for miss it first.

 kernel/smp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/kernel/smp.c b/kernel/smp.c
index 7c56aba..af86f5e 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -57,6 +57,9 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
 		if (!zalloc_cpumask_var_node(&cfd->cpumask, GFP_KERNEL,
 				cpu_to_node(cpu)))
 			return notifier_from_errno(-ENOMEM);
+		if (!zalloc_cpumask_var_node(&cfd->cpumask_ipi, GFP_KERNEL,
+				cpu_to_node(cpu)))
+			return notifier_from_errno(-ENOMEM);
 		break;
 
 #ifdef CONFIG_HOTPLUG_CPU
@@ -66,6 +69,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
 	case CPU_DEAD:
 	case CPU_DEAD_FROZEN:
 		free_cpumask_var(cfd->cpumask);
+		free_cpumask_var(cfd->cpumask_ini);
 		break;
 #endif
 	};
-- 
1.7.11.1.116.g8228a23

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-01-28  4:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-28  4:49 [PATCH Resend] smp:Fix use un-initialized cpumask_ipi Wang YanQing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox