]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
Fix lazy mode vmalloc synchronization for paravirt
authorZachary Amsden <zach@vmware.com>
Wed, 22 Aug 2007 01:30:36 +0000 (18:30 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 22 Aug 2007 18:10:47 +0000 (11:10 -0700)
Touching vmalloc memory in the middle of a lazy mode update can generate
a kernel PDE update, which must be flushed immediately.  The fix is to
leave lazy mode when doing a vmalloc sync.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/i386/mm/fault.c

index 01ffdd4964f08e9bec86c5ae759da9f5cbe8270a..fcb38e7f35434113896abc3caad887c9aad665d1 100644 (file)
@@ -249,9 +249,10 @@ static inline pmd_t *vmalloc_sync_one(pgd_t *pgd, unsigned long address)
        pmd_k = pmd_offset(pud_k, address);
        if (!pmd_present(*pmd_k))
                return NULL;
-       if (!pmd_present(*pmd))
+       if (!pmd_present(*pmd)) {
                set_pmd(pmd, *pmd_k);
-       else
+               arch_flush_lazy_mmu_mode();
+       } else
                BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
        return pmd_k;
 }