From: Tejun Heo <tj@kernel.org>
To: linux-kernel@vger.kernel.org, x86@kernel.org,
linux-arch@vger.kernel.org, mingo@elte.hu, andi@firstfloor.org,
hpa@zytor.com, tglx@linutronix.de
Cc: Tejun Heo <tj@kernel.org>
Subject: [PATCH 1/6] x86: make pcpu_chunk_addr_search() matching stricter
Date: Wed, 17 Jun 2009 13:04:31 +0900 [thread overview]
Message-ID: <1245211476-27015-2-git-send-email-tj@kernel.org> (raw)
In-Reply-To: <1245211476-27015-1-git-send-email-tj@kernel.org>
The @addr passed into pcpu_chunk_addr_search() is unit0 based address
and thus should be matched inside unit0 area. Currently, when it uses
chunk size when determining whether the address falls in the first
chunk. Addresses in unitN where N>0 shouldn't be passed in anyway, so
this doesn't cause any malfunction but fix it for consistency.
[ Impact: mostly cleanup ]
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>
---
mm/percpu.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/percpu.c b/mm/percpu.c
index b149845..19dd83b 100644
--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -290,7 +290,7 @@ static struct pcpu_chunk *pcpu_chunk_addr_search(void *addr)
void *first_start = pcpu_first_chunk->vm->addr;
/* is it in the first chunk? */
- if (addr >= first_start && addr < first_start + pcpu_chunk_size) {
+ if (addr >= first_start && addr < first_start + pcpu_unit_size) {
/* is it in the reserved area? */
if (addr < first_start + pcpu_reserved_chunk_limit)
return pcpu_reserved_chunk;
--
1.6.0.2
next prev parent reply other threads:[~2009-06-17 4:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-17 4:04 [GIT PATCH core/percpu] x86,percpu: generalize 4k and lpage allocator Tejun Heo
2009-06-17 4:04 ` Tejun Heo [this message]
2009-06-17 4:04 ` [PATCH 2/6] percpu: drop @unit_size from embed first chunk allocator Tejun Heo
2009-06-17 4:04 ` [PATCH 3/6] x86,percpu: generalize 4k " Tejun Heo
2009-06-17 4:04 ` [PATCH 4/6] percpu: make 4k first chunk allocator map memory Tejun Heo
2009-06-17 4:04 ` [PATCH 5/6] x86,percpu: generalize lpage first chunk allocator Tejun Heo
2009-06-17 4:04 ` [PATCH 6/6] percpu: simplify pcpu_setup_first_chunk() 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=1245211476-27015-2-git-send-email-tj@kernel.org \
--to=tj@kernel.org \
--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