提交 0feca851 编写于 作者: J Jeremy Fitzhardinge 提交者: Ingo Molnar

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: NJeremy 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: NIngo Molnar <mingo@elte.hu>
上级 e954ef20
...@@ -87,6 +87,8 @@ bool __virt_addr_valid(unsigned long x) ...@@ -87,6 +87,8 @@ bool __virt_addr_valid(unsigned long x)
return false; return false;
if (__vmalloc_start_set && is_vmalloc_addr((void *) x)) if (__vmalloc_start_set && is_vmalloc_addr((void *) x))
return false; return false;
if (x >= FIXADDR_START)
return false;
return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT); return pfn_valid((x - PAGE_OFFSET) >> PAGE_SHIFT);
} }
EXPORT_SYMBOL(__virt_addr_valid); EXPORT_SYMBOL(__virt_addr_valid);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册