linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hariom Panthi <hariom1.p@samsung.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "urezki@gmail.com" <urezki@gmail.com>,
	"hch@infradead.org" <hch@infradead.org>,
	"lstoakes@gmail.com" <lstoakes@gmail.com>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Maninder Singh <maninder1.s@samsung.com>,
	Rohit Thapliyal <r.thapliyal@samsung.com>
Subject: Re: [PATCH 1/1] mm: vmalloc: dump page owner info if page is already mapped
Date: Tue, 23 Apr 2024 09:20:07 +0530	[thread overview]
Message-ID: <20240423035007epcms5p44dc3e16cb8477df9159642a857726a44@epcms5p4> (raw)
In-Reply-To: <20240422142835.3a2fe7740dfc3003b68de305@linux-foundation.org>

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 



      parent reply	other threads:[~2024-04-23  3:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240419044047epcas5p4a90ca734d73bc9a87cd1670beaa24d8e@epcas5p4.samsung.com>
2024-04-19  4:39 ` Hariom Panthi
2024-04-22 21:28   ` Andrew Morton
     [not found]   ` <CGME20240419044047epcas5p4a90ca734d73bc9a87cd1670beaa24d8e@epcms5p4>
2024-04-23  3:50     ` Hariom Panthi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240423035007epcms5p44dc3e16cb8477df9159642a857726a44@epcms5p4 \
    --to=hariom1.p@samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lstoakes@gmail.com \
    --cc=maninder1.s@samsung.com \
    --cc=r.thapliyal@samsung.com \
    --cc=urezki@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox