[PATCH 3/5] kexec_file: Honor the segment alignment for CMA allocations

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Oct 23 01:18:14 PDT 2026


> From: Han Gao <gaohan at iscas.ac.cn>
> 
> dma_alloc_from_contiguous() limits the requested alignment to
> CONFIG_CMA_ALIGNMENT without reporting it. kexec_alloc_contig() can
> therefore place a segment at a less aligned address than buf_align. On
> RISC-V with 4 KiB pages, the default 1 MiB limit is below the 2 MiB
> kernel alignment, and the new kernel stops at the setup_vm() BUG_ON for
> a misaligned physical address.
> 
> Release such a block and fall back to the regular memory hole search,
> which honors the alignment.
> 
> Fixes: 07d24902977e ("kexec: enable CMA based contiguous allocation")
> Signed-off-by: Han Gao <gaohan at iscas.ac.cn>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261023-riscv-kexec-cma-fixes-v1-0-825b90ea23c4@iscas.ac.cn?part=3




More information about the kexec mailing list