[PATCH 3/5] riscv: mm: Fix NULL pointer dereference in __set_memory

Michael Neuling mikey at neuling.org
Thu Apr 9 23:23:40 PDT 2026


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

Mikey



More information about the linux-riscv mailing list