From: Jan Beulich Date: Thu, 15 Feb 2018 17:17:32 +0000 (+0100) Subject: x86/srat: fix end calculation in nodes_cover_memory() X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~564 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fdbed42649eb064e7c6d1bae2bdd4f46e7b2a160;p=xen.git x86/srat: fix end calculation in nodes_cover_memory() Along the lines of commit 7226486767 ("x86/srat: fix the end pfn check in valid_numa_range()") nodes_cover_memory() also doesn't consistently use "end": It's set to an inclusive value initially, but then compared to the exclusive "end" field of struct node and also possibly set to nodes[j].start, making it exclusive too. Change the initialization to make the variable consistently exclusive. Signed-off-by: Jan Beulich Acked-by: Andrew Cooper --- diff --git a/xen/arch/x86/srat.c b/xen/arch/x86/srat.c index 49d04b887b..166eb44fe2 100644 --- a/xen/arch/x86/srat.c +++ b/xen/arch/x86/srat.c @@ -368,7 +368,7 @@ static int __init nodes_cover_memory(void) } start = e820.map[i].addr; - end = e820.map[i].addr + e820.map[i].size - 1; + end = e820.map[i].addr + e820.map[i].size; do { found = 0;