From: Zachary Amsden Date: Wed, 22 Aug 2007 01:30:36 +0000 (-0700) Subject: Fix lazy mode vmalloc synchronization for paravirt X-Git-Tag: v2.6.23-rc4~94 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b14cb9953c6b569327e9372718cff09a98f9589;p=linux-2.6 Fix lazy mode vmalloc synchronization for paravirt 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 Acked-by: Jeremy Fitzhardinge Signed-off-by: Linus Torvalds --- diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 01ffdd4964..fcb38e7f35 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c @@ -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; }