Re: [PATCH v3] riscv: Fix a NULL pointer dereference in machine_kexec_prepare

From: Tao Liu

Date: Fri Jul 03 2026 - 07:34:46 EST


Hi Markus,

On Wed, Jul 1, 2026 at 6:01 PM Markus Elfring <Markus.Elfring@xxxxxx> wrote:
>
>
> > Fix this by simply adding a check before copy.
>
> a data copy attempt?
>
>
>
> > Fixes: b7fb4d78a6ad ("RISC-V: use memcpy for kexec_file mode")
>
> See also once more:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2-rc1#n34
>
>
> Would a summary phrase like “Prevent null pointer dereference in machine_kexec_prepare()”
> be nicer?

Agreed, I will improve it in v4. Thanks again for your guidance!

Thanks,
Tao Liu

>
> Regards,
> Markus
>