[PATCH v5 16/17] arm64: kexec_file: Simplify load_other_segments()

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Sep 18 03:27:18 PDT 2026


> Use `kbuf` fields directly in crash_prepare_headers() to eliminate
> the local variables "headers" and "headers_sz"..
> 
> Advance the assignment to image->elf_headers before
> calling kexec_add_buffer(). If kexec_add_buffer() fails, the explicit
> vfree() in the error path can be removed, as the global infrastructure
> in arch_kimage_file_post_load_cleanup() will handle the cleanup.
> 
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Will Deacon <will at kernel.org>
> Cc: Baoquan He <bhe at redhat.com>
> Cc: Breno Leitao <leitao at debian.org>
> Signed-off-by: Jinjie Ruan <ruanjinjie at huawei.com>

Sashiko has reviewed this patch and found no issues. It looks great!

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




More information about the kexec mailing list