diff options
-rw-r--r-- | fs/proc/task_mmu.c | 2 | ||||
-rw-r--r-- | mm/mempolicy.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 390bdab01c3..ad4df869c90 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -1353,7 +1353,7 @@ static int gather_hugetbl_stats(pte_t *pte, unsigned long hmask, struct numa_maps *md; struct page *page; - if (pte_none(*pte)) + if (!pte_present(*pte)) return 0; page = pte_page(*pte); diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 927a69cf354..a005cc9f6f1 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -525,9 +525,13 @@ static void queue_pages_hugetlb_pmd_range(struct vm_area_struct *vma, #ifdef CONFIG_HUGETLB_PAGE int nid; struct page *page; + pte_t entry; spin_lock(&vma->vm_mm->page_table_lock); - page = pte_page(huge_ptep_get((pte_t *)pmd)); + entry = huge_ptep_get((pte_t *)pmd); + if (!pte_present(entry)) + goto unlock; + page = pte_page(entry); nid = page_to_nid(page); if (node_isset(nid, *nodes) == !!(flags & MPOL_MF_INVERT)) goto unlock; |