From: David S. Miller Date: Thu, 29 Sep 2005 04:48:25 +0000 (-0700) Subject: [SPARC64]: Solidify check in cheetah_check_main_memory(). X-Git-Tag: v2.6.14-rc3~33^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ed3ffaf7b5e0262cb860f106a6632933671cc88f;p=linux-2.6-omap-h63xx.git [SPARC64]: Solidify check in cheetah_check_main_memory(). Need to make sure the address is below high_memory before passing it to kern_addr_valid(). Signed-off-by: David S. Miller --- diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index eeb1e835c42..7f190fc5754 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c @@ -1333,6 +1333,9 @@ static int cheetah_check_main_memory(unsigned long paddr) { unsigned long vaddr = PAGE_OFFSET + paddr; + if (vaddr > high_memory) + return 0; + return kern_addr_valid(vaddr); }