[PATCH v3 [resend] 01/18] Revert "kernel/smp.c: free related resources when failure occurs in hotplug_cfd()"

From: Jiang Liu
Date: Sun Dec 15 2013 - 11:39:52 EST


This reverts commit 60c323699bb308404dcb60e8808531e02651578a.

Commit 60c323699bb30840 fixes a bug introduced by f44310b98ddb7, and we
are going to revert f44310b98ddb7, so revert 60c323699bb30840 first.

Signed-off-by: Jiang Liu <liuj97@xxxxxxxxx>
---
kernel/smp.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/smp.c b/kernel/smp.c
index bd9f940..442d514 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -48,13 +48,10 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)
cpu_to_node(cpu)))
return notifier_from_errno(-ENOMEM);
if (!zalloc_cpumask_var_node(&cfd->cpumask_ipi, GFP_KERNEL,
- cpu_to_node(cpu))) {
- free_cpumask_var(cfd->cpumask);
+ cpu_to_node(cpu)))
return notifier_from_errno(-ENOMEM);
- }
cfd->csd = alloc_percpu(struct call_single_data);
if (!cfd->csd) {
- free_cpumask_var(cfd->cpumask_ipi);
free_cpumask_var(cfd->cpumask);
return notifier_from_errno(-ENOMEM);
}
--
1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/