linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: David Hildenbrand <david@redhat.com>,
	Donet Tom <donettom@linux.ibm.com>,
	Hannes Reinecke <hare@kernel.org>
Cc: Oscar Salvador <osalvador@suse.de>, linux-mm@kvack.org
Subject: Re: [PATCH 2/2] mm/memory_hotplug: activate node before adding new memory blocks
Date: Wed, 2 Jul 2025 09:52:33 +0200	[thread overview]
Message-ID: <86f89a65-f0f6-4462-9eea-ac691de2f3b6@suse.de> (raw)
In-Reply-To: <91b9bdfc-57b2-45ba-93f3-e91a95fb32a5@redhat.com>

On 7/2/25 08:36, David Hildenbrand wrote:
> On 02.07.25 08:25, Donet Tom wrote:
>> Hi Hannes Reinecke
>>
>> On 7/1/25 5:11 PM, Hannes Reinecke wrote:
>>> The sysfs attributes for memory blocks require the node ID to be
>>> set and initialized, so move the node activation before adding
>>> new memory blocks. This also has the nice side effect that the
>>> BUG_ON() can be converted into a WARN_ON() as we now can handle
>>> registration errors.
>>
>> Since this fixes the issue, should we consider adding a Fixes: tag?
> 
> Yeah (I mentioned this to patch #1 only). And we should probably CC stable.
> 
> I would assume the issue is fairly old.
> 
And indeed, as old as to be basically meaningless.
The most likely candidate I've found is
b9ff036082cd ("mm/memory_hotplug.c: make add_memory_resource use 
__try_online_node")
(Sorry, Oscar, for picking on you :-)
Before that the history got obscured by later changes.
Problem is that we have two different issues here; the one
is the mis-order of uevents vs sysfs attributes, which, from
what I can see, is a day-one issue.
The other is a crash when accessing sysfs attributes, which I guess
crept in with
d84f2f5a7552 ("drivers/base/node.c: simplify 
unregister_memory_block_under_nodes()")
but it's hard to be sure.
And in either case, any of these is soo old as would affect pretty
much everyone.
(Oh fsck. _Someone_ will have to do the backports ...)

Anyway.

Cheers,

Hannes

-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich


  reply	other threads:[~2025-07-02  7:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-01 11:41 [PATCH 0/2] mm/memory_hotplug: fixup crash during uevent handling Hannes Reinecke
2025-07-01 11:41 ` [PATCH 1/2] drivers/base/memory: add node id parameter to add_memory_block() Hannes Reinecke
2025-07-01 11:55   ` David Hildenbrand
2025-07-01 13:57   ` Oscar Salvador
2025-07-01 11:41 ` [PATCH 2/2] mm/memory_hotplug: activate node before adding new memory blocks Hannes Reinecke
2025-07-01 12:09   ` David Hildenbrand
2025-07-01 12:18     ` Hannes Reinecke
2025-07-01 14:02   ` Oscar Salvador
2025-07-01 18:52     ` Oscar Salvador
2025-07-01 18:55       ` Oscar Salvador
2025-07-01 19:23         ` David Hildenbrand
2025-07-02  5:24           ` Oscar Salvador
2025-07-02  6:25   ` Donet Tom
2025-07-02  6:36     ` David Hildenbrand
2025-07-02  7:52       ` Hannes Reinecke [this message]
2025-07-01 11:53 ` [PATCH 0/2] mm/memory_hotplug: fixup crash during uevent handling David Hildenbrand

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=86f89a65-f0f6-4462-9eea-ac691de2f3b6@suse.de \
    --to=hare@suse.de \
    --cc=david@redhat.com \
    --cc=donettom@linux.ibm.com \
    --cc=hare@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=osalvador@suse.de \
    /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