Skip to content

Commit

Permalink
[S390] panic_stack leak in smp_alloc_lowcore
Browse files Browse the repository at this point in the history
Fix freeing of the panic_stack if the allocation of async_stack failed.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Dec 25, 2008
1 parent 4f7e90d commit 33b1d09
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions arch/s390/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 33b1d09

Please sign in to comment.