[PATCH v7 06/15] LoongArch: kexec_file: Fix elf_headers memory leak in retry loop

sashiko-bot at kernel.org sashiko-bot at kernel.org
Mon Oct 26 03:21:20 PDT 2026


> A retry allocates new elf headers and overwrites image->elf_headers,
> leaking the previous buffer.  Free it before assigning.
> 
> Cc: Huacai Chen <chenhuacai at kernel.org>
> Cc: WANG Xuerui <kernel at xen0n.name>
> Cc: Youling Tang <tangyouling at kylinos.cn>
> Cc: Mike Rapoport (Microsoft) <rppt at kernel.org>
> Cc: Sourabh Jain <sourabhjain at linux.ibm.com>
> Cc: Kees Cook <kees at kernel.org>
> Cc: stable at vger.kernel.org
> Link: https://sashiko.dev/#/patchset/20260729031235.2840255-1-ruanjinjie%40huawei.com
> Fixes: 55d990f0084c ("LoongArch: Add EFI binary support for kexec_file")
> 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=6




More information about the kexec mailing list