summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/setup_percpu.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2009-06-22 06:56:24 +0400
committerTejun Heo <tj@kernel.org>2009-06-22 06:56:24 +0400
commitc5806df9232d2a7f554b4839b57cac2e664fc256 (patch)
tree11719fecc7383c4777df8610932fa599c1de00d4 /arch/x86/kernel/setup_percpu.c
parent85ae87c1ad8e18a421e7448a99a42ecda183f29f (diff)
downloadlinux-c5806df9232d2a7f554b4839b57cac2e664fc256.tar.xz
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>
Diffstat (limited to 'arch/x86/kernel/setup_percpu.c')
-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)
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);