Re: [PATCH v2 2/2] kexec: fix error propagation in kexec_image_probe_default()

Pratyush Yadav <[email protected]>
Newsgroups org.infradead.lists.kexec,dev.linux.lists.loongarch,org.infradead.lists.linux-arm-kernel,org.infradead.lists.linux-riscv,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Wed, Aug 19 2026, Mukesh Pilaniya wrote:

> kexec_image_probe_default() overwrites ret with each loader's probe
> return value and returns whatever the last loader returned when no
> probe matches.  The error code reaching userspace depends on whichever
> loader happens to be last in kexec_file_loaders[].
>
> Only continue to the next loader when a probe returns -ENOEXEC.
> Propagate any other error such as -ENOMEM immediately. Return -ENOEXEC
> only when all loaders have been tried and none matched.
>
> Suggested-by: Pratyush Yadav <[email protected]>
> Signed-off-by: Mukesh Pilaniya <[email protected]>

Reviewed-by: Pratyush Yadav <[email protected]>

[...]

-- 
Regards,
Pratyush Yadav
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.