Skip to content

Commit

Permalink
x86/mm: Flush lazy MMU when DEBUG_PAGEALLOC is set
Browse files Browse the repository at this point in the history
When CONFIG_DEBUG_PAGEALLOC is set page table updates made by
kernel_map_pages() are not made visible (via TLB flush)
immediately if lazy MMU is on. In environments that support lazy
MMU (e.g. Xen) this may lead to fatal page faults, for example,
when zap_pte_range() needs to allocate pages in
__tlb_remove_page() -> tlb_next_batch().

Signed-off-by: Boris Ostrovsky <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
Boris Ostrovsky authored and Ingo Molnar committed Apr 12, 2013
1 parent 1869973 commit 2656460
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/x86/mm/pageattr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,8 @@ void kernel_map_pages(struct page *page, int numpages, int enable)
* but that can deadlock->flush only current cpu:
*/
__flush_tlb_all();

arch_flush_lazy_mmu_mode();
}

#ifdef CONFIG_HIBERNATION
Expand Down

0 comments on commit 2656460

Please sign in to comment.