summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 15:39:27 +0300
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-12-25 15:39:16 +0300
commit33b1d09ef317d64c58b135c2e811bb55b3f15b19 (patch)
tree40b7448fb78f750cd7725d75c5873e49a837d03b
parent4f7e90d6d61fa0e56821787521c12f8a626c4037 (diff)
downloadlinux-33b1d09ef317d64c58b135c2e811bb55b3f15b19.tar.xz
[S390] panic_stack leak in smp_alloc_lowcore
Fix freeing of the panic_stack if the allocation of async_stack failed. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/kernel/smp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index bf170c698f0c..1e7db1ab7453 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -500,18 +500,15 @@ static int __cpuinit smp_alloc_lowcore(int cpu)
save_area = get_zeroed_page(GFP_KERNEL);
if (!save_area)
- goto out_save_area;
+ goto out;
lowcore->extended_save_area_addr = (u32) save_area;
}
#endif
lowcore_ptr[cpu] = lowcore;
return 0;
-#ifndef CONFIG_64BIT
-out_save_area:
- free_page(panic_stack);
-#endif
out:
+ free_page(panic_stack);
free_pages(async_stack, ASYNC_ORDER);
free_pages((unsigned long) lowcore, lc_order);
return -ENOMEM;