summaryrefslogtreecommitdiffstats
path: root/mm/mprotect.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-10-19 23:24:03 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-10-19 23:24:03 +0200
commitb41fb43911b4cb864812adec88d028cc6219f23e (patch)
treef383de554dc3640ec3081ad41fa34f7cab68de82 /mm/mprotect.c
parent0963d59bc0bbed48b06733950f5eb167e9b9a8fa (diff)
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
downloadlinux-b41fb43911b4cb864812adec88d028cc6219f23e.tar.bz2
Merge tag 'v3.12-rc6' into devel
Linux 3.12-rc6 Conflicts: drivers/gpio/gpio-lynxpoint.c
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r--mm/mprotect.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 94722a4d6b43..a3af058f68e4 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -94,13 +94,16 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
swp_entry_t entry = pte_to_swp_entry(oldpte);
if (is_write_migration_entry(entry)) {
+ pte_t newpte;
/*
* A protection check is difficult so
* just be safe and disable write
*/
make_migration_entry_read(&entry);
- set_pte_at(mm, addr, pte,
- swp_entry_to_pte(entry));
+ newpte = swp_entry_to_pte(entry);
+ if (pte_swp_soft_dirty(oldpte))
+ newpte = pte_swp_mksoft_dirty(newpte);
+ set_pte_at(mm, addr, pte, newpte);
}
pages++;
}