From: Tejun Heo <tj@kernel.org>
To: linux-kernel@vger.kernel.org, x86@kernel.org,
linux-arch@vger.kernel.org, mingo@elte.hu, JBeulich@novell.com,
andi@firstfloor.org, hpa@zytor.com, tglx@linutronix.de
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/7] x86: fix duplicate free in setup_pcpu_remap() failure path
Date: Wed, 17 Jun 2009 12:52:13 +0900 [thread overview]
Message-ID: <1245210739-25699-2-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1245210739-25699-1-git-send-email-tj@kernel.org>
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>
---
arch/x86/kernel/setup_percpu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c
index 9c3f082..dfbc7e6 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);
--
1.6.0.2
next prev parent reply other threads:[~2009-06-17 3:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 3:52 [GIT PATCH core/percpu] x86,percpu: fix pageattr handling with remap allocator, take#4 Tejun Heo
2009-06-17 3:52 ` Tejun Heo [this message]
2009-06-17 3:52 ` [PATCH 2/7] x86: rename remap percpu first chunk allocator to lpage Tejun Heo
2009-06-17 3:52 ` [PATCH 3/7] x86: prepare setup_pcpu_lpage() for pageattr fix Tejun Heo
2009-06-17 3:52 ` [PATCH 4/7] x86: reorganize cpa_process_alias() Tejun Heo
2009-06-17 3:52 ` [PATCH 5/7] x86: fix pageattr handling for lpage percpu allocator and re-enable it Tejun Heo
2009-06-17 3:52 ` [PATCH 6/7] x86: implement percpu_alloc kernel parameter Tejun Heo
2009-06-17 3:52 ` [PATCH 7/7] x86: ensure percpu lpage doesn't consume too much vmalloc space Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1245210739-25699-2-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--cc=JBeulich@novell.com \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).