aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2009-03-06 13:09:26 -0500
committerIngo Molnar <mingo@elte.hu>2009-03-08 15:03:52 -0400
commit0feca851c1b3cb4ebfa3149144b3d5de0879ebaa (patch)
tree41762096e1faebbc512b07fcfb7627fa2d1c688e
parente954ef20c29b7af07a8cb5452f14fb69e3d9d2b2 (diff)
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>
-rw-r--r--arch/x86/mm/ioremap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 62773abdf088..62def5795730 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -87,6 +87,8 @@ bool __virt_addr_valid(unsigned long x)
87 return false; 87 return false;
88 if (__vmalloc_start_set && is_vmalloc_addr((void *) x)) 88 if (__vmalloc_start_set && is_vmalloc_addr((void *) x))
89 return false; 89 return false;
90 if (x >= FIXADDR_START)
91 return false;
90 return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT); 92 return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT);
91} 93}
92EXPORT_SYMBOL(__virt_addr_valid); 94EXPORT_SYMBOL(__virt_addr_valid);