On Thu, Aug 07, 2025 at 08:35:45PM +0200, Sumanth Korikkar wrote: >For !CONFIG_SPARSEMEM_VMEMMAP, memmap page accounting is currently done >upfront in sparse_buffer_init(). However, sparse_buffer_alloc() may >return NULL in failure scenario. > >Also, memmap pages may be allocated either from the memblock allocator >during early boot or from the buddy allocator. When removed via >arch_remove_memory(), accounting of memmap pages must reflect the >original allocation source. > >To ensure correctness: >* Account memmap pages after successful allocation in sparse_init_nid() > and section_activate(). >* Account memmap pages in section_deactivate() based on allocation > source. > >Cc: stable@xxxxxxxxxxxxxxx >Fixes: 15995a352474 ("mm: report per-page metadata information") >Suggested-by: David Hildenbrand <david@xxxxxxxxxx> >Signed-off-by: Sumanth Korikkar <sumanthk@xxxxxxxxxxxxx> LGTM Reviewed-by: Wei Yang <richard.weiyang@xxxxxxxxx> -- Wei Yang Help you, Help me