[PATCH v2] riscv: Check the return value of reloc handlers
Paul Walmsley
pjw at kernel.org
Thu May 21 15:44:28 PDT 2026
Hi,
On Sat, 9 May 2026, Zishun Yi wrote:
> Currently, process_accumulated_relocations() ignores the return values
> from both reloc_handler() and accumulate_handler().
>
> As a result, the kernel will proceed to load the module with corrupted
> or incomplete sections, which can lead to unpredictable behavior or
> kernel panics.
>
> So we need to check the return values of the handlers to propagate the
> error, and fall back to the cleanup mode.
Thanks for the patch. Rather than continuing to loop without purpose when
an error occurs, can the function simply be exited?
- Paul
More information about the linux-riscv
mailing list