The patch titled Subject: mm/gup: fix gup_pmd_range() for dax has been added to the -mm tree. Its filename is mm-gup-fix-gup_pmd_range-for-dax.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-gup-fix-gup_pmd_range-for-dax.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-gup-fix-gup_pmd_range-for-dax.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: Yu Zhao <yuzhao@xxxxxxxxxx> Subject: mm/gup: fix gup_pmd_range() for dax For dax pmd, pmd_trans_huge() returns false but pmd_huge() returns true on x86. So the function works as long as hugetlb is configured. However, dax doesn't depend on hugetlb. Link: http://lkml.kernel.org/r/20190111034033.601-1-yuzhao@xxxxxxxxxx Signed-off-by: Yu Zhao <yuzhao@xxxxxxxxxx> Cc: Dan Williams <dan.j.williams@xxxxxxxxx> Cc: Huang Ying <ying.huang@xxxxxxxxx> Cc: Matthew Wilcox <willy@xxxxxxxxxxxxx> Cc: Keith Busch <keith.busch@xxxxxxxxx> Cc: "Michael S . Tsirkin" <mst@xxxxxxxxxx> Cc: Jan Kara <jack@xxxxxxx> Cc: John Hubbard <jhubbard@xxxxxxxxxx> Cc: Wei Yang <richard.weiyang@xxxxxxxxx> Cc: Mike Rapoport <rppt@xxxxxxxxxxxxx> Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx> Cc: "Kirill A . Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- --- a/mm/gup.c~mm-gup-fix-gup_pmd_range-for-dax +++ a/mm/gup.c @@ -1826,7 +1826,8 @@ static int gup_pmd_range(pud_t pud, unsi if (!pmd_present(pmd)) return 0; - if (unlikely(pmd_trans_huge(pmd) || pmd_huge(pmd))) { + if (unlikely(pmd_trans_huge(pmd) || pmd_huge(pmd) || + pmd_devmap(pmd))) { /* * NUMA hinting faults need to be handled in the GUP * slowpath for accounting purposes and so that they _ Patches currently in -mm which might be from yuzhao@xxxxxxxxxx are mm-gup-fix-gup_pmd_range-for-dax.patch mm-dont-expose-page-to-fast-gup-before-its-ready.patch