Merge tag 'tee-fix-for-v5.0' of https://git.linaro.org/people/jens.wiklander/linux...
[linux-2.6-block.git] / mm / gup.c
index 05acd7e2eb22e0849c5125d0cabc671fdc58f71f..75029649baca4ac834732b931cb9f743cdc58afb 100644 (file)
--- a/mm/gup.c
+++ b/mm/gup.c
@@ -1674,7 +1674,8 @@ static int gup_pmd_range(pud_t pud, unsigned long addr, unsigned long end,
                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