Skip to content

Commit

Permalink
[PATCH] x86_64: Fix off by one in acpi table mapping
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Jan 12, 2006
1 parent 7180d4f commit 7a4a76c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/i386/kernel/acpi/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7a4a76c

Please sign in to comment.