aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-06-21 22:56:24 -0400
committerTejun Heo <tj@kernel.org>2009-06-21 22:56:24 -0400
commitc5806df9232d2a7f554b4839b57cac2e664fc256 (patch)
tree11719fecc7383c4777df8610932fa599c1de00d4
parent85ae87c1ad8e18a421e7448a99a42ecda183f29f (diff)
x86: fix duplicate free in setup_pcpu_remap() failure path
In the failure path, setup_pcpu_remap() tries to free the area which has already been freed to make holes in the large page. Fix it. [ Impact: fix duplicate free in failure path ] Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/setup_percpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 9c3f0823e6aa..dfbc7e6c64d4 100644
--- a/arch/x86/kernel/setup_percpu.c
+++ b/arch/x86/kernel/setup_percpu.c
@@ -228,7 +228,7 @@ static ssize_t __init setup_pcpu_remap(size_t static_size)
228enomem: 228enomem:
229 for_each_possible_cpu(cpu) 229 for_each_possible_cpu(cpu)
230 if (pcpur_ptrs[cpu]) 230 if (pcpur_ptrs[cpu])
231 free_bootmem(__pa(pcpur_ptrs[cpu]), PMD_SIZE); 231 free_bootmem(__pa(pcpur_ptrs[cpu]), pcpur_size);
232 ret = -ENOMEM; 232 ret = -ENOMEM;
233out_free_ar: 233out_free_ar:
234 free_bootmem(__pa(pcpur_ptrs), ptrs_size); 234 free_bootmem(__pa(pcpur_ptrs), ptrs_size);