mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
Some nodes do not allocate any early boot memory. An example is
hotpluggable nodes with movable_node enabled. So the bootmem size for
them ends up being zero.
Zero size allocations normally don't play well with memblock. Memblock
returns an address, but then doesn't actually reserve anything. This
address ends up being recorded in kho_bootmem with a size of 0. In case
of hotpluggable nodes with movable_nodes, the allocation on the node
actually fails because memblock refuses to allocate there, and so KHO
fails to initialize.
Skip bootmem reservation for such nodes entirely.
To keep the code more robust, avoid overloading kho_bootmem_cnt. use
max_nr_bootmem to store the size of kho_bootmem array. This ensures that
the location of kho_bootmem_cnt assignment does not affect the cleanup
paths.
Fixes:
|
||
|---|---|---|
| .. | ||
| Kconfig | ||
| kexec_handover_debugfs.c | ||
| kexec_handover_internal.h | ||
| kexec_handover.c | ||
| kho_block.c | ||
| luo_core.c | ||
| luo_file.c | ||
| luo_flb.c | ||
| luo_internal.h | ||
| luo_session.c | ||
| Makefile | ||