Skip to content

Commit

Permalink
[PATCH] x86_64: Fix off by one in e820_mapped
Browse files Browse the repository at this point in the history
This allows a valid iommu placed immediately after memory to work, to be
recognized as after the last byte of memory and not overlapping it.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Eric W. Biederman authored and Linus Torvalds committed Sep 7, 2005
1 parent a888ceb commit 48c8b11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86_64/kernel/e820.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ int __init e820_mapped(unsigned long start, unsigned long end, unsigned type)
struct e820entry *ei = &e820.map[i];
if (type && ei->type != type)
continue;
if (ei->addr >= end || ei->addr + ei->size < start)
if (ei->addr >= end || ei->addr + ei->size <= start)
continue;
return 1;
}
Expand Down

0 comments on commit 48c8b11

Please sign in to comment.