diff options
author | Wang Wensheng <wangwensheng4@huawei.com> | 2021-04-29 22:57:58 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-14 09:44:32 +0200 |
commit | de143fb2feacd61dab675f87127697c45dedc97c (patch) | |
tree | a72790f7a8a3097f966d9d0a2d07c8a89d185e6e /mm | |
parent | ba450bba7115a7a46a8fa1463de829d3a6610b9f (diff) | |
download | linux-stable-de143fb2feacd61dab675f87127697c45dedc97c.tar.gz linux-stable-de143fb2feacd61dab675f87127697c45dedc97c.tar.bz2 linux-stable-de143fb2feacd61dab675f87127697c45dedc97c.zip |
mm/sparse: add the missing sparse_buffer_fini() in error branch
[ Upstream commit 2284f47fe9fe2ed2ef619e5474e155cfeeebd569 ]
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.
Link: https://lkml.kernel.org/r/20210325113155.118574-1-wangwensheng4@huawei.com
Fixes: 85c77f791390 ("mm/sparse: add new sparse_init_nid() and sparse_init()")
Signed-off-by: Wang Wensheng <wangwensheng4@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Cc: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/sparse.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/sparse.c b/mm/sparse.c index 78bbecd904c3..191e29cca3fb 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -551,6 +551,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); |