Re: [PATCH 3/5] riscv: mm: Fix NULL pointer dereference in __set_memory
From: David Hildenbrand (Arm)
Date: Fri Apr 10 2026 - 03:42:57 EST
On 4/10/26 08:23, Michael Neuling wrote:
>>> area = find_vm_area((void *)start);
>>> + if (!area) {
>>> + ret = -EINVAL;
>>> + goto unlock;
>>> + }
>>> page_start = (start - (unsigned long)area->addr) >> PAGE_SHIFT;
>>>
>>> for (i = page_start; i < page_start + numpages; ++i) {
>>
>> Which caller would end up calling __set_memory() in such a way?
>
> It wouldn't. You're right on this and the other two. Sorry for the noise.
Slopped-by: Cursor:claude-4.6-opus-high-thinking
:)
Patch #1 seems reasonable (although non-critical); not sure about patch
#2, leaving both to Risc-V people!
--
Cheers,
David