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

From: Markus Elfring

Date: Mon Mar 16 2026 - 06:23:47 EST


> 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?

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?


Regards,
Markus