On 07/04/22 10:33, Naoya Horiguchi wrote: > From: Naoya Horiguchi <naoya.horiguchi@xxxxxxx> > > follow_pud_mask() does not support non-present pud entry now. As long as > I tested on x86_64 server, follow_pud_mask() still simply returns > no_page_table() for non-present_pud_entry() due to pud_bad(), so no severe > user-visible effect should happen. But generally we should call > follow_huge_pud() for non-present pud entry for 1GB hugetlb page. > > Update pud_huge() and follow_huge_pud() to handle non-present pud entries. > The changes are similar to previous works for pud entries commit e66f17ff7177 > ("mm/hugetlb: take page table lock in follow_huge_pmd()") and commit > cbef8478bee5 ("mm/hugetlb: pmd_huge() returns true for non-present hugepage"). > > Signed-off-by: Naoya Horiguchi <naoya.horiguchi@xxxxxxx> > --- > v2 -> v3: > - fixed typos in subject and description, > - added comment on pud_huge(), > - added comment about fallback for hwpoisoned entry, > - updated initial check about FOLL_{PIN,GET} flags. > --- > arch/x86/mm/hugetlbpage.c | 8 +++++++- > mm/hugetlb.c | 32 ++++++++++++++++++++++++++++++-- > 2 files changed, 37 insertions(+), 3 deletions(-) Thanks! Reviewed-by: Mike Kravetz <mike.kravetz@xxxxxxxxxx> -- Mike Kravetz