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 <zach@vmware.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Zachary Amsden 2007-08-21 18:30:36 -07:00 committed by Linus Torvalds
parent cb00e99c0a
commit 8b14cb9953

View 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); pmd_k = pmd_offset(pud_k, address);
if (!pmd_present(*pmd_k)) if (!pmd_present(*pmd_k))
return NULL; return NULL;
if (!pmd_present(*pmd)) if (!pmd_present(*pmd)) {
set_pmd(pmd, *pmd_k); set_pmd(pmd, *pmd_k);
else arch_flush_lazy_mmu_mode();
} else
BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k));
return pmd_k; return pmd_k;
} }