lkml.org 
[lkml]   [2026]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 3/5] riscv: mm: Fix NULL pointer dereference in __set_memory
From
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

\
 
 \ /
  Last update: 2026-04-10 09:43    [W:0.101 / U:31.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog