aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r--arch/x86/mm/fault.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
index 8f92cac4e6db..3f2b8962cbd0 100644
--- a/arch/x86/mm/fault.c
+++ b/arch/x86/mm/fault.c
@@ -592,11 +592,6 @@ void __kprobes do_page_fault(struct pt_regs *regs, unsigned long error_code)
592 unsigned long flags; 592 unsigned long flags;
593#endif 593#endif
594 594
595 /*
596 * We can fault from pretty much anywhere, with unknown IRQ state.
597 */
598 trace_hardirqs_fixup();
599
600 tsk = current; 595 tsk = current;
601 mm = tsk->mm; 596 mm = tsk->mm;
602 prefetchw(&mm->mmap_sem); 597 prefetchw(&mm->mmap_sem);
@@ -914,15 +909,15 @@ LIST_HEAD(pgd_list);
914 909
915void vmalloc_sync_all(void) 910void vmalloc_sync_all(void)
916{ 911{
917#ifdef CONFIG_X86_32
918 unsigned long start = VMALLOC_START & PGDIR_MASK;
919 unsigned long address; 912 unsigned long address;
920 913
914#ifdef CONFIG_X86_32
921 if (SHARED_KERNEL_PMD) 915 if (SHARED_KERNEL_PMD)
922 return; 916 return;
923 917
924 BUILD_BUG_ON(TASK_SIZE & ~PGDIR_MASK); 918 for (address = VMALLOC_START & PMD_MASK;
925 for (address = start; address >= TASK_SIZE; address += PGDIR_SIZE) { 919 address >= TASK_SIZE && address < FIXADDR_TOP;
920 address += PMD_SIZE) {
926 unsigned long flags; 921 unsigned long flags;
927 struct page *page; 922 struct page *page;
928 923
@@ -935,10 +930,8 @@ void vmalloc_sync_all(void)
935 spin_unlock_irqrestore(&pgd_lock, flags); 930 spin_unlock_irqrestore(&pgd_lock, flags);
936 } 931 }
937#else /* CONFIG_X86_64 */ 932#else /* CONFIG_X86_64 */
938 unsigned long start = VMALLOC_START & PGDIR_MASK; 933 for (address = VMALLOC_START & PGDIR_MASK; address <= VMALLOC_END;
939 unsigned long address; 934 address += PGDIR_SIZE) {
940
941 for (address = start; address <= VMALLOC_END; address += PGDIR_SIZE) {
942 const pgd_t *pgd_ref = pgd_offset_k(address); 935 const pgd_t *pgd_ref = pgd_offset_k(address);
943 unsigned long flags; 936 unsigned long flags;
944 struct page *page; 937 struct page *page;