Skip to content

Commit

Permalink
Fix lazy mode vmalloc synchronization for paravirt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Zachary Amsden authored and Linus Torvalds committed Aug 22, 2007
1 parent cb00e99 commit 8b14cb9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/i386/mm/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8b14cb9

Please sign in to comment.