From: Greg Kroah-Hartman Date: Tue, 7 Jan 2014 18:20:21 +0000 (-0800) Subject: 3.12-stable patches X-Git-Tag: v3.4.76~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a02669cbe9655de7c3d6178bf669fd26e68ecdd9;p=thirdparty%2Fkernel%2Fstable-queue.git 3.12-stable patches added patches: mm-numa-clear-numa-hinting-information-on-mprotect.patch --- diff --git a/queue-3.12/mm-numa-clear-numa-hinting-information-on-mprotect.patch b/queue-3.12/mm-numa-clear-numa-hinting-information-on-mprotect.patch new file mode 100644 index 00000000000..2ee5933ac22 --- /dev/null +++ b/queue-3.12/mm-numa-clear-numa-hinting-information-on-mprotect.patch @@ -0,0 +1,49 @@ +From mgorman@suse.de Tue Jan 7 10:18:32 2014 +From: Mel Gorman +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 , stable@vger.kernel.org +Message-ID: <1389103248-17617-10-git-send-email-mgorman@suse.de> + +From: Mel Gorman + +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 +Reviewed-by: Rik van Riel +Cc: Alex Thorlton +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman +--- + 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 { diff --git a/queue-3.12/series b/queue-3.12/series index 01526e250f5..ac7d17a6ab6 100644 --- a/queue-3.12/series +++ b/queue-3.12/series @@ -114,6 +114,7 @@ mm-numa-do-not-clear-pte-for-pte_numa-update.patch 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