diff options
| author | Wang Wensheng <[email protected]> | 2021-04-30 05:57:58 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-04-30 18:20:39 +0000 |
| commit | 2284f47fe9fe2ed2ef619e5474e155cfeeebd569 (patch) | |
| tree | 712b1d0364e2a7904fd5c94d7d23c7eaaa31d968 /mm/sparse.c | |
| parent | mm/dmapool: switch from strlcpy to strscpy (diff) | |
| download | kernel-2284f47fe9fe2ed2ef619e5474e155cfeeebd569.tar.gz kernel-2284f47fe9fe2ed2ef619e5474e155cfeeebd569.zip | |
mm/sparse: add the missing sparse_buffer_fini() in error branch
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/[email protected]
Fixes: 85c77f791390 ("mm/sparse: add new sparse_init_nid() and sparse_init()")
Signed-off-by: Wang Wensheng <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Oscar Salvador <[email protected]>
Cc: Pavel Tatashin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'mm/sparse.c')
| -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 7bd23f9d6cef..33406ea2ecc4 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); |
