summaryrefslogtreecommitdiff
path: root/mm/mprotect.c
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2014-01-07 14:00:44 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-01-09 20:25:14 (GMT)
commit3d792d616ba408ab55a54c1bb75a9367d997acfa (patch)
tree185b242f40ebac44cef05cd42f29b6edf94e5593 /mm/mprotect.c
parentcefeb27999f88f9348f1c55753339535ee9016aa (diff)
downloadlinux-fsl-qoriq-3d792d616ba408ab55a54c1bb75a9367d997acfa.tar.xz
mm: numa: clear numa hinting information on mprotect
commit 1667918b6483b12a6496bf54151b827b8235d7b1 upstream. On a protection change it is no longer clear if the page should be still accessible. This patch clears the NUMA hinting fault bits on a protection change. Signed-off-by: Mel Gorman <mgorman@suse.de> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Alex Thorlton <athorlton@sgi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r--mm/mprotect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 3277121..00edb75 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 {