diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2021-11-04 16:45:40 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2021-11-04 16:45:40 +0100 |
commit | 4a0abd7dd466276ee3fdf79b54f05f845f7d8844 (patch) | |
tree | fc43c16f111b65876c05e227fbd76e76604acf33 /mm/huge_memory.c | |
parent | f8e718054f4421d11638e370b933ccc6c77466ed (diff) | |
parent | e0018f4c9325b36ae75a591d54879bf9a9f41a26 (diff) |
Merge tag 'v4.4.291' into toradex_vf_4.4-nexttoradex_vf_4.4-nexttoradex_vf_4.4
This is the 4.4.291 stable release
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 6404e4fcb4ed..2f53786098c5 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -1268,13 +1268,12 @@ out_unlock: } /* - * FOLL_FORCE can write to even unwritable pmd's, but only - * after we've gone through a COW cycle and they are dirty. + * FOLL_FORCE or a forced COW break can write even to unwritable pmd's, + * but only after we've gone through a COW cycle and they are dirty. */ static inline bool can_follow_write_pmd(pmd_t pmd, unsigned int flags) { - return pmd_write(pmd) || - ((flags & FOLL_FORCE) && (flags & FOLL_COW) && pmd_dirty(pmd)); + return pmd_write(pmd) || ((flags & FOLL_COW) && pmd_dirty(pmd)); } struct page *follow_trans_huge_pmd(struct vm_area_struct *vma, @@ -1341,9 +1340,6 @@ int do_huge_pmd_numa_page(struct mm_struct *mm, struct vm_area_struct *vma, bool was_writable; int flags = 0; - /* A PROT_NONE fault should not end up here */ - BUG_ON(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))); - ptl = pmd_lock(mm, pmdp); if (unlikely(!pmd_same(pmd, *pmdp))) goto out_unlock; |