aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-06-22 11:56:24 +0900
committerTejun Heo <tj@kernel.org>2009-06-22 11:56:24 +0900
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 9c3f0823e6a..dfbc7e6c64d 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)
enomem:
for_each_possible_cpu(cpu)
if (pcpur_ptrs[cpu])
- free_bootmem(__pa(pcpur_ptrs[cpu]), PMD_SIZE);
+ free_bootmem(__pa(pcpur_ptrs[cpu]), pcpur_size);
ret = -ENOMEM;
out_free_ar:
free_bootmem(__pa(pcpur_ptrs), ptrs_size);