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-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed3ffaf7b5e0262cb860f106a6632933671cc88f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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 eeb1e835c423..7f190fc57545 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); }