Merge tag 'mm-stable-2024-05-17-19-19' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / arch / arm64 / mm / hugetlbpage.c
index ca58210..3f09ac7 100644 (file)
@@ -262,7 +262,10 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
        pte_t *ptep = NULL;
 
        pgdp = pgd_offset(mm, addr);
-       p4dp = p4d_offset(pgdp, addr);
+       p4dp = p4d_alloc(mm, pgdp, addr);
+       if (!p4dp)
+               return NULL;
+
        pudp = pud_alloc(mm, p4dp, addr);
        if (!pudp)
                return NULL;