]> xenbits.xensource.com Git - people/dariof/xen.git/commitdiff
x86/srat: fix end calculation in nodes_cover_memory()
authorJan Beulich <jbeulich@suse.com>
Thu, 15 Feb 2018 17:17:32 +0000 (18:17 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 15 Feb 2018 17:17:32 +0000 (18:17 +0100)
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 <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/srat.c

index 49d04b887bbea2cfb8f0e23fc329c19d6b3b697a..166eb44fe2838a9e88db6bb908e0386e817d0ae9 100644 (file)
@@ -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;