The patch titled Subject: mm: hugetlb: add missing cache flushing in hugetlb_unshare_all_pmds() has been added to the -mm tree. Its filename is mm-hugetlb-add-missing-cache-flushing-in-hugetlb_unshare_all_pmds.patch This patch should soon appear at https://ozlabs.org/~akpm/mmots/broken-out/mm-hugetlb-add-missing-cache-flushing-in-hugetlb_unshare_all_pmds.patch and later at https://ozlabs.org/~akpm/mmotm/broken-out/mm-hugetlb-add-missing-cache-flushing-in-hugetlb_unshare_all_pmds.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Subject: mm: hugetlb: add missing cache flushing in hugetlb_unshare_all_pmds() Missed calling flush_cache_range() before removing the sharing PMD entrires, otherwise data consistence issue may be occurred on some architectures whose caches are strict and require a virtualâ??>physical translation to exist for a virtual address. Thus add it. Link: https://lkml.kernel.org/r/419b0e777c9e6d1454dcd906e0f5b752a736d335.1650781755.git.baolin.wang@xxxxxxxxxxxxxxxxx Fixes: 6dfeaff93be1 ("hugetlb/userfaultfd: unshare all pmds for hugetlbfs when register wp") Signed-off-by: Baolin Wang <baolin.wang@xxxxxxxxxxxxxxxxx> Reviewed-by: Muchun Song <songmuchun@xxxxxxxxxxxxx> Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx> Cc: Peter Xu <peterx@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/hugetlb.c~mm-hugetlb-add-missing-cache-flushing-in-hugetlb_unshare_all_pmds +++ a/mm/hugetlb.c @@ -6941,6 +6941,7 @@ void hugetlb_unshare_all_pmds(struct vm_ if (start >= end) return; + flush_cache_range(vma, start, end); /* * No need to call adjust_range_if_pmd_sharing_possible(), because * we have already done the PUD_SIZE alignment. _ Patches currently in -mm which might be from baolin.wang@xxxxxxxxxxxxxxxxx are mm-hugetlb-add-missing-cache-flushing-in-hugetlb_unshare_all_pmds.patch mm-migrate-simplify-the-refcount-validation-when-migrating-hugetlb-mapping.patch