Re: [PATCH] kdump: Give crashkernel CMA areas unique names

From: David Hildenbrand (Arm)

Date: Fri Nov 06 2026 - 07:43:59 EST


On 11/6/26 11:43, Mikhail Zaslonko wrote:
> reserve_crashkernel_cma() names every CMA area it reserves
> "crashkernel". If the requested size can't be reserved in one piece,
> it falls back to several smaller areas, all with the same name.
> With CONFIG_CMA_SYSFS, cma_sysfs_init() then fails to create the second
> directory:
>
> sysfs: cannot create duplicate filename '/kernel/mm/cma/crashkernel'
>
> and the error path removes the sysfs entries of all CMA areas.
>
> With CONFIG_CMA_DEBUGFS, debugfs refuses the duplicate directories as
> well:
>
> debugfs: 'crashkernel' already exists in 'cma'
>
> so only the first area shows up in debugfs.
>
> Keep the name of the first area and add the index to the others:
> crashkernel, crashkernel1, crashkernel2, ...
>
> Fixes: ab475510e042 ("kdump: implement reserve_crashkernel_cma")
> Signed-off-by: Mikhail Zaslonko <zaslonko@xxxxxxxxxxxxx>
> ---

Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>

--
Cheers,

David