]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] x86_64: Fix off by one in acpi table mapping
authorAndi Kleen <ak@suse.de>
Wed, 11 Jan 2006 21:43:39 +0000 (22:43 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 12 Jan 2006 03:04:51 +0000 (19:04 -0800)
And fix the test to include the size

Noticed by Vivek Goyal

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/i386/kernel/acpi/boot.c

index 447fa9e33ffbeaaca7bbee58621900cbf0ba2b1e..2111529dea77821ff595ce4a21edb369102b9b93 100644 (file)
@@ -108,7 +108,7 @@ char *__acpi_map_table(unsigned long phys_addr, unsigned long size)
        if (!phys_addr || !size)
                return NULL;
 
-       if (phys_addr < (end_pfn_map << PAGE_SHIFT))
+       if (phys_addr+size <= (end_pfn_map << PAGE_SHIFT) + PAGE_SIZE)
                return __va(phys_addr);
 
        return NULL;