summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/parse_data_structs.py
diff options
context:
space:
mode:
authorLance Yang <lance.yang@linux.dev>2026-10-01 00:04:32 +0800
committerDavid Hildenbrand (Arm) <david@kernel.org>2026-10-01 21:52:30 +0200
commitc31bb839fb829958101250ee5acfa4f94fdb7ecd (patch)
treef7bd69a191163d426ccf235236093a4e1e9a20d3 /tools/lib/python/kdoc/parse_data_structs.py
parentfa4df92e3d18e2428d7313350350de21824e183d (diff)
downloadlinux-next-c31bb839fb829958101250ee5acfa4f94fdb7ecd.tar.gz
linux-next-c31bb839fb829958101250ee5acfa4f94fdb7ecd.zip
mm/memory_hotplug: fix missing rollback in __add_pages()
__add_pages() returns on a sparse_add_section() failure without removing the sections already added in the same request. For memremap_pages(), the failed range is not counted in pgmap->nr_range, so memunmap_pages() skips it. The sections already added in that range retain their vmemmap mappings and subsection bits. Retrying a section-aligned range can then fail with -EEXIST. Save the initial PFN and remove [start_pfn, pfn) on failure. For a vmemmap population failure, section_activate() already cleans up the current section, so the rollback excludes it. If the first section fails, __remove_pages() receives an empty range and does nothing. Link: https://lore.kernel.org/all/BAD58999-1EDD-4A37-ABA0-DB1BD8AB3453@linux.dev/ Suggested-by: Muchun Song <muchun.song@linux.dev> Signed-off-by: Lance Yang <lance.yang@linux.dev> Fixes: ba72b4c8cf60 ("mm/sparsemem: support sub-section hotplug") Acked-by: Muchun Song <muchun.song@linux.dev> Link: https://patch.msgid.link/20260930160432.5564-1-lance.yang@linux.dev Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
Diffstat (limited to 'tools/lib/python/kdoc/parse_data_structs.py')
0 files changed, 0 insertions, 0 deletions