[PATCH v7 04/15] arm64: kexec_file: Fix elf_headers memory leak in retry loop

sashiko-bot at kernel.org sashiko-bot at kernel.org
Mon Oct 26 03:00:50 PDT 2026


> A retry allocates new elf headers and overwrites image->elf_headers,
> leaking the previous buffer.  Free it before assigning.
> 
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Thomas Huth <thuth at redhat.com>
> Cc: Breno Leitao <leitao at debian.org>
> Cc: Andrew Morton <akpm at linux-foundation.org>
> Cc: Yeoreum Yun <yeoreum.yun at arm.com>
> Cc: Baoquan He <bhe at redhat.com>
> Cc: stable at vger.kernel.org
> Fixes: 108aa503657e ("arm64: kexec_file: try more regions if loading segments fails")
> Acked-by: Catalin Marinas <catalin.marinas at arm.com>
> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261026075201.699550-1-ruanjinjie@huawei.com?part=4




More information about the kexec mailing list