diff options
author | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2013-04-11 13:59:52 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2013-04-12 01:19:19 -0400 |
commit | 26564600c9e88c6572a5e6ef5ae9121907edfb7f (patch) | |
tree | d25db287b106e4417667beafb2f3d39012accc20 /arch/x86 | |
parent | 18699739b60cb60230153ff5475b2ba92be185f9 (diff) |
x86/mm: Flush lazy MMU when DEBUG_PAGEALLOC is set
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 <boris.ostrovsky@oracle.com>
Cc: konrad.wilk@oracle.com
Link: http://lkml.kernel.org/r/1365703192-2089-1-git-send-email-boris.ostrovsky@oracle.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/mm/pageattr.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 7896f7190fda..fb4e73ec24d8 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c | |||
@@ -1413,6 +1413,8 @@ void kernel_map_pages(struct page *page, int numpages, int enable) | |||
1413 | * but that can deadlock->flush only current cpu: | 1413 | * but that can deadlock->flush only current cpu: |
1414 | */ | 1414 | */ |
1415 | __flush_tlb_all(); | 1415 | __flush_tlb_all(); |
1416 | |||
1417 | arch_flush_lazy_mmu_mode(); | ||
1416 | } | 1418 | } |
1417 | 1419 | ||
1418 | #ifdef CONFIG_HIBERNATION | 1420 | #ifdef CONFIG_HIBERNATION |