public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [tip:x86/mm-v2] x86-32: make sure virt_addr_valid() returns false for fixmap addresses
       [not found] <49B166D6.2080505@goop.org>
@ 2009-03-08 19:27 ` Jeremy Fitzhardinge
  0 siblings, 0 replies; only message in thread
From: Jeremy Fitzhardinge @ 2009-03-08 19:27 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, yinghai, jirislaby, jeremy.fitzhardinge,
	jeremy, tglx, mingo

Commit-ID:  0feca851c1b3cb4ebfa3149144b3d5de0879ebaa
Gitweb:     http://git.kernel.org/tip/0feca851c1b3cb4ebfa3149144b3d5de0879ebaa
Author:     "Jeremy Fitzhardinge" <jeremy@goop.org>
AuthorDate: Fri, 6 Mar 2009 10:09:26 -0800
Commit:     Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 8 Mar 2009 20:03:52 +0100

x86-32: make sure virt_addr_valid() returns false for fixmap addresses

I found that virt_addr_valid() was returning true for fixmap addresses.

I'm not sure whether pfn_valid() is supposed to include this test,
but there's no harm in being explicit.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Cc: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <49B166D6.2080505@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/mm/ioremap.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 62773ab..62def57 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -87,6 +87,8 @@ bool __virt_addr_valid(unsigned long x)
 		return false;
 	if (__vmalloc_start_set && is_vmalloc_addr((void *) x))
 		return false;
+	if (x >= FIXADDR_START)
+		return false;
 	return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT);
 }
 EXPORT_SYMBOL(__virt_addr_valid);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-08 19:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <49B166D6.2080505@goop.org>
2009-03-08 19:27 ` [tip:x86/mm-v2] x86-32: make sure virt_addr_valid() returns false for fixmap addresses Jeremy Fitzhardinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox