diff options
Diffstat (limited to 'mm')
-rw-r--r-- | mm/huge_memory.c | 2 | ||||
-rw-r--r-- | mm/mprotect.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index a458517187c..40f4ceb979f 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1483,6 +1483,8 @@ int change_huge_pmd(struct vm_area_struct *vma, pmd_t *pmd, pmd_t entry; if (!prot_numa) { entry = pmdp_get_and_clear(mm, addr, pmd); + if (pmd_numa(entry)) + entry = pmd_mknonnuma(entry); entry = pmd_modify(entry, newprot); BUG_ON(pmd_write(entry)); set_pmd_at(mm, addr, pmd, entry); diff --git a/mm/mprotect.c b/mm/mprotect.c index 3277121e032..00edb758f7d 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -56,6 +56,8 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd, if (!prot_numa) { ptent = ptep_modify_prot_start(mm, addr, pte); + if (pte_numa(ptent)) + ptent = pte_mknonnuma(ptent); ptent = pte_modify(ptent, newprot); updated = true; } else { |