]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SPARC64]: Solidify check in cheetah_check_main_memory().
authorDavid S. Miller <davem@sunset.davemloft.net>
Thu, 29 Sep 2005 04:48:25 +0000 (21:48 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 29 Sep 2005 04:48:25 +0000 (21:48 -0700)
Need to make sure the address is below high_memory before
passing it to kern_addr_valid().

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/traps.c

index eeb1e835c4232a83a4c5ae1b093dcdd7c0865bcf..7f190fc5754516303bc8f81469605708e5da5c5d 100644 (file)
@@ -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);
 }