aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/memory.c')
-rw-r--r--mm/memory.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 1fcf59a097b3..d17f1bcd2a91 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -753,7 +753,7 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
753 unsigned long pfn = pte_pfn(pte); 753 unsigned long pfn = pte_pfn(pte);
754 754
755 if (HAVE_PTE_SPECIAL) { 755 if (HAVE_PTE_SPECIAL) {
756 if (likely(!pte_special(pte) || pte_numa(pte))) 756 if (likely(!pte_special(pte)))
757 goto check_pfn; 757 goto check_pfn;
758 if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP)) 758 if (vma->vm_flags & (VM_PFNMAP | VM_MIXEDMAP))
759 return NULL; 759 return NULL;
@@ -779,15 +779,14 @@ struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
779 } 779 }
780 } 780 }
781 781
782 if (is_zero_pfn(pfn))
783 return NULL;
782check_pfn: 784check_pfn:
783 if (unlikely(pfn > highest_memmap_pfn)) { 785 if (unlikely(pfn > highest_memmap_pfn)) {
784 print_bad_pte(vma, addr, pte, NULL); 786 print_bad_pte(vma, addr, pte, NULL);
785 return NULL; 787 return NULL;
786 } 788 }
787 789
788 if (is_zero_pfn(pfn))
789 return NULL;
790
791 /* 790 /*
792 * NOTE! We still have PageReserved() pages in the page tables. 791 * NOTE! We still have PageReserved() pages in the page tables.
793 * eg. VDSO mappings can cause them to exist. 792 * eg. VDSO mappings can cause them to exist.