Re: [PATCH] riscv: mm: add null check for find_vm_area in set_memory

From: Osama Abdelkader

Date: Mon Mar 16 2026 - 11:29:35 EST


On Mon, Mar 16, 2026 at 11:22:26AM +0100, Markus Elfring wrote:
> > find_vm_area() can return NULL. Add a null check to avoid potential
> > null pointer dereference, matching the pattern used by other arches.
>
> 1. Were any source code analysis tools involved here?

No, both were found during manual review and compare with arm64.

>
> 2. How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.0-rc4#n145
>
> 3. Would you like to refer to the function “__set_memory” in the summary phrase?
>

Done, I just sent v2, appreciate your review.

>
> Regards,
> Markus

Thanks,
Osama