diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 9a3d451402d7..078d95cd32c5 100644 --- a/mm/userfaultfd.c +++ b/mm/userfaultfd.c @@ -83,6 +83,8 @@ static int mcopy_atomic_pte(struct mm_struct *dst_mm, /* don't free the page */ goto out; } + + flush_dcache_page(page); } else { page = *pagep; *pagep = NULL; @@ -595,6 +597,7 @@ static __always_inline ssize_t __mcopy_atomic(struct mm_struct *dst_mm, err = -EFAULT; goto out; } + flush_dcache_page(page); goto retry; } else BUG_ON(page);