diff options
author | David S. Miller <davem@davemloft.net> | 2014-10-08 22:22:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-08 22:22:22 +0200 |
commit | 64b1f00a0830e1c53874067273a096b228d83d36 (patch) | |
tree | dd547b0f1d431d0995b8eaa711cedb92399f31fe /mm/migrate.c | |
parent | netlabel: directly return netlbl_unlabel_genl_init() (diff) | |
parent | net_sched: copy exts->type in tcf_exts_change() (diff) | |
download | linux-64b1f00a0830e1c53874067273a096b228d83d36.tar.xz linux-64b1f00a0830e1c53874067273a096b228d83d36.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'mm/migrate.c')
-rw-r--r-- | mm/migrate.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c index f78ec9bd454d..2740360cd216 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -146,8 +146,11 @@ static int remove_migration_pte(struct page *new, struct vm_area_struct *vma, pte = pte_mkold(mk_pte(new, vma->vm_page_prot)); if (pte_swp_soft_dirty(*ptep)) pte = pte_mksoft_dirty(pte); + + /* Recheck VMA as permissions can change since migration started */ if (is_write_migration_entry(entry)) - pte = pte_mkwrite(pte); + pte = maybe_mkwrite(pte, vma); + #ifdef CONFIG_HUGETLB_PAGE if (PageHuge(new)) { pte = pte_mkhuge(pte); |