diff options
author | Zachary Amsden <zach@vmware.com> | 2007-08-21 21:30:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-08-22 14:10:47 -0400 |
commit | 8b14cb9953c6b569327e9372718cff09a98f9589 (patch) | |
tree | b4eeaa2cb428fc6471c0f124cb8bb9e23de03273 /arch/i386/mm/fault.c | |
parent | cb00e99c0abd844b884c64c6b54aa3b7d345ebb1 (diff) |
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>
Diffstat (limited to 'arch/i386/mm/fault.c')
-rw-r--r-- | arch/i386/mm/fault.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 01ffdd4964f0..fcb38e7f3543 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) | |||
249 | pmd_k = pmd_offset(pud_k, address); | 249 | pmd_k = pmd_offset(pud_k, address); |
250 | if (!pmd_present(*pmd_k)) | 250 | if (!pmd_present(*pmd_k)) |
251 | return NULL; | 251 | return NULL; |
252 | if (!pmd_present(*pmd)) | 252 | if (!pmd_present(*pmd)) { |
253 | set_pmd(pmd, *pmd_k); | 253 | set_pmd(pmd, *pmd_k); |
254 | else | 254 | arch_flush_lazy_mmu_mode(); |
255 | } else | ||
255 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); | 256 | BUG_ON(pmd_page(*pmd) != pmd_page(*pmd_k)); |
256 | return pmd_k; | 257 | return pmd_k; |
257 | } | 258 | } |