--- /dev/null
+From mgorman@suse.de Tue Jan 7 10:18:32 2014
+From: Mel Gorman <mgorman@suse.de>
+Date: Tue, 7 Jan 2014 14:00:44 +0000
+Subject: mm: numa: clear numa hinting information on mprotect
+To: gregkh@linuxfoundation.org
+Cc: athorlton@sgi.com, riel@redhat.com, chegu_vinod@hp.com, Mel Gorman <mgorman@suse.de>, stable@vger.kernel.org
+Message-ID: <1389103248-17617-10-git-send-email-mgorman@suse.de>
+
+From: Mel Gorman <mgorman@suse.de>
+
+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>
+---
+ mm/huge_memory.c | 2 ++
+ mm/mprotect.c | 2 ++
+ 2 files changed, 4 insertions(+)
+
+--- a/mm/huge_memory.c
++++ b/mm/huge_memory.c
+@@ -1483,6 +1483,8 @@ int change_huge_pmd(struct vm_area_struc
+ 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);
+--- a/mm/mprotect.c
++++ b/mm/mprotect.c
+@@ -56,6 +56,8 @@ static unsigned long change_pte_range(st
+
+ 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 {
mm-numa-ensure-anon_vma-is-locked-to-prevent-parallel-thp-splits.patch
mm-numa-avoid-unnecessary-work-on-the-failure-path.patch
sched-numa-skip-inaccessible-vmas.patch
+mm-numa-clear-numa-hinting-information-on-mprotect.patch
mm-mempolicy-correct-putback-method-for-isolate-pages-if-failed.patch
mm-compaction-respect-ignore_skip_hint-in-update_pageblock_skip.patch
mm-memory-failure.c-recheck-pagehuge-after-hugetlb-page-migrate-successfully.patch