diff options
| author | Pratyush Yadav (Google) <pratyush@kernel.org> | 2026-10-14 15:15:44 +0200 |
|---|---|---|
| committer | Mike Rapoport (Microsoft) <rppt@kernel.org> | 2026-10-15 11:37:32 +0300 |
| commit | 9a6a70aefe77f6fb9ff2b3037dcf87f6dff65c8c (patch) | |
| tree | 87e2d029112386000ca25821c1583dd33ba5a7fd /scripts/Makefile.thinlto | |
| parent | 48e6e4202e12af36671c6479b9ebcb8212d37cbb (diff) | |
| download | linux-9a6a70aefe77f6fb9ff2b3037dcf87f6dff65c8c.tar.gz linux-9a6a70aefe77f6fb9ff2b3037dcf87f6dff65c8c.zip | |
kho: do not reserve empty per-node bootmem areas
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: 3dc92c311498 ("kexec: add Kexec HandOver (KHO) generation helpers")
Reported-by: Bing Jiao <bingjiao@google.com>
Signed-off-by: Pratyush Yadav (Google) <pratyush@kernel.org>
Link: https://patch.msgid.link/20261014131547.259138-1-pratyush@kernel.org
Signed-off-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
