arm64: mm: only wrprotect clean ptes if they are present
authorWill Deacon <will.deacon@arm.com>
Wed, 9 Jan 2013 11:08:10 +0000 (11:08 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 10 Jan 2013 10:43:44 +0000 (10:43 +0000)
commit02522463c84748b3b8ad770f9424bcfa70a5b4c4
tree5fc357a4979da3d355735215a01900b3f2e2994c
parentbdba0051ebcb3c6372f9cc0b2524c47cc6ce46fd
arm64: mm: only wrprotect clean ptes if they are present

Marking non-present ptes as read-only can corrupt file ptes, breaking
things like swap and file mappings.

This patch ensures that we only manipulate user pte bits when the pte
is marked present.

Cc: <stable@vger.kernel.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/pgtable.h