From: "peng8420.li" In some scenarios, `__vm_normal_page` might return NULL. In this case, if `is_zero_pfn(pte_pfn(pte))` is true, simply return `page = pte_page(pte)`; no further folio processing is needed. Signed-off-by: peng8420.li --- mm/gup.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/gup.c b/mm/gup.c index 95d948c8e86c..60ae5f0c20e0 100644 --- a/mm/gup.c +++ b/mm/gup.c @@ -838,6 +838,7 @@ static struct page *follow_page_pte(struct vm_area_struct *vma, if (is_zero_pfn(pte_pfn(pte))) { page = pte_page(pte); + goto out; } else { ret = follow_pfn_pte(vma, address, ptep, flags); page = ERR_PTR(ret); -- 2.43.0