[PATCH] riscv: Check the return value of reloc handlers

Paul Walmsley pjw at kernel.org
Thu Apr 30 13:04:20 PDT 2026


Hello Zishun Yi (and, apparently, Wentao Liang), 

On Sat, 21 Mar 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.
> 
> Fixes: 8fd6c5142395 ("riscv: Add remaining module relocations")
> Signed-off-by: Zishun Yi <vulab at iscas.ac.cn>

Thank you for sending this and several other fixes.  I would like to 
accept the RISC-V-oriented fixes, but have a few questions first -- 
similar to the ones that Markus already asked you several weeks ago.

First: were these fixes found and/or generated by LLM tools?  They appear 
to be.  If so, please add an Assisted-by: tag, according to the directions 
documented here:

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n637 

and here:

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/coding-assistants.rst


Second: is it possible for you both to get your own unique E-mail 
accounts?  Many kernel developers and tools assume that a specific E-mail 
address will be used by only one person.  For example, Patchwork is now 
incorrectly attributing patches originally sent by Zishun Yi to Wentao 
Liang, under the not-unreasonable assumption that each developer will have 
their own E-mail address.


- Paul



More information about the linux-riscv mailing list