Re: riscv: mm: add null check for find_vm_area in set_memory

From: Markus Elfring

Date: Mon Mar 16 2026 - 12:37:28 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?
>
> No, both were found during manual review and compare with arm64.

Would be looking for the support of advanced approaches
which would make such a “comparison” more convenient?

Regards,
Markus