All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oscar Salvador <osalvador@suse.de>
To: David Hildenbrand <david@redhat.com>
Cc: Baolin Wang <baolin.wang@linux.alibaba.com>,
	Markus Gothe <markus.gothe@genexis.eu>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	Zi Yan <ziy@nvidia.com>
Subject: Re: get_pageblock_bitmap() sometimes returns a NULL pointer which needs to be properly handled
Date: Mon, 6 May 2024 12:42:56 +0200	[thread overview]
Message-ID: <Zji0MJ3fMN5AfbTb@localhost.localdomain> (raw)
In-Reply-To: <96439935-ce2a-4714-be5d-cdeb8ea0eb41@redhat.com>

On Mon, May 06, 2024 at 11:54:49AM +0200, David Hildenbrand wrote:
> But, could it be that we failing during compaction_alloc() [lr :
> compaction_alloc+0x220/0x804] and have an issue during
> set_pfnblock_flags_mask() on a page that sits on the isolated freelist?
> Similarly, memory hotunplug should not be able to mess up here.

But pageblock_flags is something that gets initialized at boot time and
never touched again (for already present sections).
There are two paths to get it:

section_to_usemap(__pfn_to_section(pfn))
or
page_zone(page)->pageblock_flags

Assuming the we somehow fail in compaction_alloc() and get a bad page or
NULL, we should crash before reaching to the point where we ask for
pageblock_flags.

-- 
Oscar Salvador
SUSE Labs


      parent reply	other threads:[~2024-05-06 10:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-02 16:02 get_pageblock_bitmap() sometimes returns a NULL pointer which needs to be properly handled Markus Gothe
2024-05-06  9:39 ` Baolin Wang
2024-05-06  9:51   ` Markus Gothe
2024-05-06  9:54   ` David Hildenbrand
2024-05-06 10:01     ` Markus Gothe
2024-05-06 10:45       ` David Hildenbrand
2024-05-06 10:42     ` Oscar Salvador [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=Zji0MJ3fMN5AfbTb@localhost.localdomain \
    --to=osalvador@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=markus.gothe@genexis.eu \
    --cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.