]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
mm/autonuma: don't use set_pte_at when updating protnone ptes
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Fri, 24 Feb 2017 22:59:13 +0000 (14:59 -0800)
committerTim Gardner <tim.gardner@canonical.com>
Fri, 10 Mar 2017 13:22:05 +0000 (06:22 -0700)
commit02f3ac9d360d72d0a89f90b3f628fbc91d03e398
tree3cb1ffb82b530b30e85cc49b46aa676adbfdcca4
parent3257f3b1ff628b5b6c9ca5c50dd1df8c702ebef7
mm/autonuma: don't use set_pte_at when updating protnone ptes

BugLink: http://bugs.launchpad.net/bugs/1671613
Architectures like ppc64, use privilege access bit to mark pte non
accessible.  This implies that kernel can do a copy_to_user to an
address marked for numa fault.  This also implies that there can be a
parallel hardware update for the pte.  set_pte_at cannot be used in such
scenarios.  Hence switch the pte update to use ptep_get_and_clear and
set_pte_at combination.

[akpm@linux-foundation.org: remove unwanted ppc change, per Aneesh]
Link: http://lkml.kernel.org/r/1486400776-28114-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Rik van Riel <riel@redhat.com>
Acked-by: Mel Gorman <mgorman@techsingularity.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(back ported from commit cee216a696b2004017a5ecb583366093d90b1568)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Conflicts:
mm/memory.c
mm/memory.c