mm/ksm: handle protnone saved writes when making page write protect
BugLink: http://bugs.launchpad.net/bugs/1671613
Without this KSM will consider the page write protected, but a numa
fault can later mark the page writable. This can result in memory
corruption.
Link: http://lkml.kernel.org/r/1487498625-10891-3-git-send-email-aneesh.kumar@linux.vnet.ibm.com
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit
595cd8f256d24face93b2722927ec9c980419c26)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>