mirror of https://gitee.com/openkylin/linux.git
[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>
This commit is contained in:
parent
4f7e90d6d6
commit
33b1d09ef3
|
@ -500,18 +500,15 @@ static int __cpuinit smp_alloc_lowcore(int cpu)
|
||||||
|
|
||||||
save_area = get_zeroed_page(GFP_KERNEL);
|
save_area = get_zeroed_page(GFP_KERNEL);
|
||||||
if (!save_area)
|
if (!save_area)
|
||||||
goto out_save_area;
|
goto out;
|
||||||
lowcore->extended_save_area_addr = (u32) save_area;
|
lowcore->extended_save_area_addr = (u32) save_area;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
lowcore_ptr[cpu] = lowcore;
|
lowcore_ptr[cpu] = lowcore;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifndef CONFIG_64BIT
|
|
||||||
out_save_area:
|
|
||||||
free_page(panic_stack);
|
|
||||||
#endif
|
|
||||||
out:
|
out:
|
||||||
|
free_page(panic_stack);
|
||||||
free_pages(async_stack, ASYNC_ORDER);
|
free_pages(async_stack, ASYNC_ORDER);
|
||||||
free_pages((unsigned long) lowcore, lc_order);
|
free_pages((unsigned long) lowcore, lc_order);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
Loading…
Reference in New Issue