aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86_64/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86_64/mm')
-rw-r--r--arch/x86_64/mm/fault.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/x86_64/mm/fault.c b/arch/x86_64/mm/fault.c
index fd07b86c062d..2a9c836133a9 100644
--- a/arch/x86_64/mm/fault.c
+++ b/arch/x86_64/mm/fault.c
@@ -237,7 +237,7 @@ static noinline void pgtable_bad(unsigned long address, struct pt_regs *regs,
237} 237}
238 238
239/* 239/*
240 * Handle a fault on the vmalloc or module mapping area 240 * Handle a fault on the vmalloc area
241 * 241 *
242 * This assumes no large pages in there. 242 * This assumes no large pages in there.
243 */ 243 */
@@ -283,7 +283,6 @@ static int vmalloc_fault(unsigned long address)
283 that. */ 283 that. */
284 if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref)) 284 if (!pte_present(*pte) || pte_pfn(*pte) != pte_pfn(*pte_ref))
285 BUG(); 285 BUG();
286 __flush_tlb_all();
287 return 0; 286 return 0;
288} 287}
289 288
@@ -346,9 +345,13 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
346 * protection error (error_code & 9) == 0. 345 * protection error (error_code & 9) == 0.
347 */ 346 */
348 if (unlikely(address >= TASK_SIZE64)) { 347 if (unlikely(address >= TASK_SIZE64)) {
348 /*
349 * Don't check for the module range here: its PML4
350 * is always initialized because it's shared with the main
351 * kernel text. Only vmalloc may need PML4 syncups.
352 */
349 if (!(error_code & 0xd) && 353 if (!(error_code & 0xd) &&
350 ((address >= VMALLOC_START && address < VMALLOC_END) || 354 ((address >= VMALLOC_START && address < VMALLOC_END))) {
351 (address >= MODULES_VADDR && address < MODULES_END))) {
352 if (vmalloc_fault(address) < 0) 355 if (vmalloc_fault(address) < 0)
353 goto bad_area_nosemaphore; 356 goto bad_area_nosemaphore;
354 return; 357 return;