mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RESEND] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set
@ 2013-04-11 17:59 Boris Ostrovsky
  2013-04-14 16:07 ` [tip:x86/urgent] x86/mm: " tip-bot for Boris Ostrovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Boris Ostrovsky @ 2013-04-11 17:59 UTC (permalink / raw)
  To: tglx, mingo, hpa; +Cc: konrad.wilk, linux-kernel, stable, Boris Ostrovsky

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>
---
 arch/x86/mm/pageattr.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c
index 091934e..2ccbe0b 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)
 	 * but that can deadlock->flush only current cpu:
 	 */
 	__flush_tlb_all();
+
+	arch_flush_lazy_mmu_mode();
 }
 
 #ifdef CONFIG_HIBERNATION
-- 
1.8.1.4


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-04-14 16:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-11 17:59 [PATCH RESEND] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set Boris Ostrovsky
2013-04-14 16:07 ` [tip:x86/urgent] x86/mm: " tip-bot for Boris Ostrovsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®