From: Jan Beulich Date: Fri, 12 Sep 2008 14:43:04 +0000 (+0100) Subject: x86-64: fix combining of regions in init_memory_mapping() X-Git-Tag: v2.6.28-rc1~611^2~61 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5e72d9e4850c91b6a0f06fa803f7393b55a38aa8;p=linux-2.6-omap-h63xx.git x86-64: fix combining of regions in init_memory_mapping() When nr_range gets decremented, the same slot must be considered for coalescing with its new successor again. The issue is apparently pretty benign to native code, but surfaces as a boot time crash in our forward ported Xen tree (where the page table setup overall works differently than in native). Signed-off-by: Jan Beulich Acked-by: Yinghai Lu Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 7c8bb46e83e..b8e461d4941 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -746,7 +746,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, old_start = mr[i].start; memmove(&mr[i], &mr[i+1], (nr_range - 1 - i) * sizeof (struct map_range)); - mr[i].start = old_start; + mr[i--].start = old_start; nr_range--; }