From: David Hildenbrand <david@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
stable@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Michal Hocko <mhocko@suse.com>,
Oscar Salvador <osalvador@suse.de>
Subject: Re: [PATCH v1] drivers/base/memory: add memory block to memory group after registration succeeded
Date: Tue, 1 Feb 2022 09:16:09 +0100 [thread overview]
Message-ID: <a457b70a-004c-e49a-26d2-c207c28bda98@redhat.com> (raw)
In-Reply-To: <20220131170123.42d7f46ecea0da1cb1579113@linux-foundation.org>
On 01.02.22 02:01, Andrew Morton wrote:
> On Fri, 28 Jan 2022 15:45:40 +0100 David Hildenbrand <david@redhat.com> wrote:
>
>> If register_memory() fails, we freed the memory block but already added
>> the memory block to the group list, not good. Let's defer adding the
>> block to the memory group to after registering the memory block device.
>>
>> We do handle it properly during unregister_memory(), but that's not
>> called when the registration fails.
>>
>
> I guess this has never been known to happen. So I queued the fix for
> 5.18-rc1, cc:stable.
Triggering that registration error is fairly hard, usually we fail
memory hotplug because we fail to allocate the (largish) memmap. So I am
not aware that this BUG actually triggered.
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2022-02-01 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-28 14:45 [PATCH v1] drivers/base/memory: add memory block to memory group after registration succeeded David Hildenbrand
2022-01-31 5:52 ` Oscar Salvador
2022-02-01 1:01 ` Andrew Morton
2022-02-01 8:16 ` David Hildenbrand [this message]
2022-02-01 12:10 ` Michal Hocko
2022-02-01 12:11 ` Michal Hocko
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=a457b70a-004c-e49a-26d2-c207c28bda98@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=rafael@kernel.org \
--cc=stable@vger.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;
as well as URLs for NNTP newsgroup(s).