aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mprotect.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-11-01 03:10:58 -0400
committerIngo Molnar <mingo@kernel.org>2013-11-01 03:24:41 -0400
commitfb10d5b7efbcc0aa9e46a9aa5ad86772c7bacb9a (patch)
treeea284fe7b9c17a85b8d3c4ba999d6e26d51a12f6 /mm/mprotect.c
parentf9f9ffc237dd924f048204e8799da74f9ecf40cf (diff)
parent52469b4fcd4fc433ffc78cec4cf94368e9052890 (diff)
Merge branch 'linus' into sched/core
Resolve cherry-picking conflicts: Conflicts: mm/huge_memory.c mm/memory.c mm/mprotect.c See this upstream merge commit for more details: 52469b4fcd4f Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Signed-off-by: Ingo Molnar <mingo@kernel.org>
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 a0302ac0be98..a597f2ffcd6f 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -84,13 +84,16 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
84 swp_entry_t entry = pte_to_swp_entry(oldpte); 84 swp_entry_t entry = pte_to_swp_entry(oldpte);
85 85
86 if (is_write_migration_entry(entry)) { 86 if (is_write_migration_entry(entry)) {
87 pte_t newpte;
87 /* 88 /*
88 * A protection check is difficult so 89 * A protection check is difficult so
89 * just be safe and disable write 90 * just be safe and disable write
90 */ 91 */
91 make_migration_entry_read(&entry); 92 make_migration_entry_read(&entry);
92 set_pte_at(mm, addr, pte, 93 newpte = swp_entry_to_pte(entry);
93 swp_entry_to_pte(entry)); 94 if (pte_swp_soft_dirty(oldpte))
95 newpte = pte_swp_mksoft_dirty(newpte);
96 set_pte_at(mm, addr, pte, newpte);
94 97
95 pages++; 98 pages++;
96 } 99 }