From: David Hildenbrand <david@redhat.com>
To: Wang Wensheng <wangwensheng4@huawei.com>,
akpm@linux-foundation.org, osalvador@suse.de,
pasha.tatashin@oracle.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Cc: rui.xiang@huawei.com
Subject: Re: [PATCH] mm/sparse: Add the missing sparse_buffer_fini() in error branch
Date: Thu, 25 Mar 2021 13:45:13 +0100 [thread overview]
Message-ID: <1f20f644-9f51-5f0b-a162-c340912b5212@redhat.com> (raw)
In-Reply-To: <20210325113155.118574-1-wangwensheng4@huawei.com>
On 25.03.21 12:31, Wang Wensheng wrote:
> sparse_buffer_init() and sparse_buffer_fini() should appear in pair, or
> a WARN issue would be through the next time sparse_buffer_init() runs.
>
> Add the missing sparse_buffer_fini() in error branch.
>
> Fixes: 85c77f791390 ("mm/sparse: add new sparse_init_nid() and sparse_init()")
> Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
> ---
> mm/sparse.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/sparse.c b/mm/sparse.c
> index 7bd23f9..33406ea 100644
> --- a/mm/sparse.c
> +++ b/mm/sparse.c
> @@ -547,6 +547,7 @@ static void __init sparse_init_nid(int nid, unsigned long pnum_begin,
> pr_err("%s: node[%d] memory map backing failed. Some memory will not be available.",
> __func__, nid);
> pnum_begin = pnum;
> + sparse_buffer_fini();
> goto failed;
> }
> check_usemap_section_nr(nid, usage);
>
Did you actually manage to reproduce this? I would have thought that
__populate_section_memmap() barely fails during boot ...
Anyhow, looks like the right think to do to me
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David / dhildenb
next prev parent reply other threads:[~2021-03-25 12:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 11:31 Wang Wensheng
2021-03-25 12:45 ` David Hildenbrand [this message]
2021-03-25 13:21 ` Oscar Salvador
2021-03-26 2:23 Wang Wensheng
2021-03-26 9:11 ` 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=1f20f644-9f51-5f0b-a162-c340912b5212@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=osalvador@suse.de \
--cc=pasha.tatashin@oracle.com \
--cc=rui.xiang@huawei.com \
--cc=wangwensheng4@huawei.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