Re: [PATCH 1/1] mm: vmalloc: dump page owner info if page is already mapped

From: Hariom Panthi
Date: Mon Apr 22 2024 - 23:50:28 EST


Hi,

> > ...
> >
> > @@ -103,7 +105,13 @@ static int vmap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
> >         if (!pte)
> >                 return -ENOMEM;
> >         do {
> > -                BUG_ON(!pte_none(ptep_get(pte)));
> > +                if (!pte_none(ptep_get(pte))) {
> > +                        if (pfn_valid(pfn)) {
> > +                                page = pfn_to_page(pfn);
> > +                                dump_page_owner(page);
> > +                        }
> > +                        BUG();
> > +                }
>
> Diving straight into dump_page_owner() seems inappropriate.  The
> higher-level dump_page() interface is more typically used.
>
> Or, even more common, VM_BUG_ON_PAGE(), but that doesn't look to be a
> good fit here.

Ok I will send V2 with dump_page API.

Thanks,
Hariom