[PATCH v2] Before adding to usablemem_rgns, check if the memory range is already included.
Simon Horman
horms at kernel.org
Mon Nov 4 01:29:28 PST 2024
On Mon, Oct 21, 2024 at 08:00:25PM +0800, Chen Haixiang wrote:
> When kexec_iomem_for_each_line() reads from /proc/iomem,
> concurrent modifications to /proc/iomem may lead to
> usablemem_rgns recording duplicate Crash kernel segments.
> This can result in the number of retrieved Crash kernel
> segments exceeding CRASH_MAX_RESERVED_RANGES, triggering
> a realloc of the crash_reserved_mem in usablemem_rgns,
> which could crash the process. We should ensure that each
> range added to usablemem_rgns is unique to prevent these issues.
>
> Reviewed-by: Louhongxiang <louhongxiang at huawei.com>
> Reviewed-by: wangbin <wangbin224 at huawei.com>
> Reviewed-by: yangyanchao <yangyanchao6 at huawei.com>
> Signed-off-by: chenhaixiang <chenhaixiang3 at huawei.com>
Thanks, applied.
More information about the kexec
mailing list