Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48c8b113 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Linus Torvalds
Browse files

[PATCH] x86_64: Fix off by one in e820_mapped



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: default avatarEric W. Biederman <ebiederm@xmission.com>
Acked-by: default avatarAndi Kleen <ak@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a888cebe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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; 
	}