]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86-64: fix combining of regions in init_memory_mapping()
authorJan Beulich <jbeulich@novell.com>
Fri, 12 Sep 2008 14:43:04 +0000 (15:43 +0100)
committerIngo Molnar <mingo@elte.hu>
Mon, 13 Oct 2008 08:21:16 +0000 (10:21 +0200)
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 <jbeulich@novell.com>
Acked-by: Yinghai Lu <yhlu.kernel@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/init_64.c

index 7c8bb46e83e48053e3796c02da85d0e3e89361b2..b8e461d4941208fab60f977471dbe088ce48d23e 100644 (file)
@@ -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--;
        }