Skip to contentSkip to conversation

smp:Fix use un-initialized cpumask_ipi

PATCH Superseded Wang YanQing 1 participant 1 message Jan 28, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smp:Fix use un-initialized cpumask_ipi

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

---
I am sorry for miss it, I just think it when I
was lying on the bed last night. :)

 kernel/smp.c | 3 +++
 1 file changed, 3 insertions(+)
kernel/smp.c +3 -0
index 7c56aba..a38aa18 100644
@@ -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
Signature · 1 line
1.7.11.1.116.g8228a23