From: "Oscar Salvador (SUSE)" <osalvador@kernel.org>
To: Georgi Djakov <georgi.djakov@oss.qualcomm.com>
Cc: akpm@linux-foundation.org, david@kernel.org, linux-mm@kvack.org,
linux-cxl@vger.kernel.org, osalvador@suse.de,
gregkh@linuxfoundation.org, rafael@kernel.org, djakov@kernel.org
Subject: Re: [PATCH v2] drivers/base/memory: set mem->altmap after successful device registration
Date: Sun, 17 May 2026 22:06:43 +0200 [thread overview]
Message-ID: <agof08pql5svngb-@localhost.localdomain> (raw)
In-Reply-To: <20260514092657.3057141-1-georgi.djakov@oss.qualcomm.com>
On Thu, May 14, 2026 at 02:26:57AM -0700, Georgi Djakov wrote:
> If __add_memory_block() fails at xa_store() (under memory pressure
> for example), device_unregister() is called, which eventually
> triggers memory_block_release() with mem->altmap still set, causing
> a WARN_ON(mem->altmap). This was triggered by modifying virtio-mem
> driver.
>
> Fix this by delaying the assignment of mem->altmap until after
> __add_memory_block() has succeeded.
>
> Fixes: 1a8c64e11043 ("mm/memory_hotplug: embed vmem_altmap details in memory block")
> Signed-off-by: Georgi Djakov <georgi.djakov@oss.qualcomm.com>
Acked-by: Oscar Salvador (SUSE) <osalvador@kernel.org>
--
Oscar Salvador
SUSE Labs
next prev parent reply other threads:[~2026-05-17 20:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 9:26 [PATCH v2] drivers/base/memory: set mem->altmap after successful device registration Georgi Djakov
2026-05-14 10:08 ` Richard Cheng
2026-05-17 20:06 ` Oscar Salvador (SUSE) [this message]
2026-05-19 20:25 ` Andrew Morton
2026-05-19 20:57 ` Georgi Djakov
2026-05-19 21:08 ` Andrew Morton
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=agof08pql5svngb-@localhost.localdomain \
--to=osalvador@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=david@kernel.org \
--cc=djakov@kernel.org \
--cc=georgi.djakov@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
--cc=rafael@kernel.org \
/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