Re: [PATCH] mm/vmalloc: bail out early on invalid page_shift in __vmap_pages_range_noflush()
From: Uladzislau Rezki
Date: Sat Oct 03 2026 - 10:55:58 EST
On Sat, Oct 03, 2026 at 06:02:37PM +0800, Barry Song wrote:
> On Sat, Oct 3, 2026 at 5:05 PM Wen Jiang <jiangwenxiaomi@xxxxxxxxx> wrote:
> >
> > __vmap_pages_range_noflush() currently only warns when page_shift is
> > smaller than PAGE_SHIFT, then continues with the invalid shift. Return
> > -EINVAL instead so the bogus argument is caught immediately.
> >
> > Suggested-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx>
> > Signed-off-by: Wen Jiang <jiangwen6@xxxxxxxxxx>
>
> I have checked this carefully and confirmed that this is a correct cleanup.
>
> However, when I applied your patch, I noticed that the author and
> Signed-off-by do not match.
>
> Author: Wen Jiang <jiangwenxiaomi@xxxxxxxxx>
> Date: Sat Oct 3 17:04:30 2026 +0800
>
> mm/vmalloc: bail out early on invalid page_shift in
> __vmap_pages_range_noflush()
> ...
> Signed-off-by: Wen Jiang <jiangwen6@xxxxxxxxxx>
>
>
> So please send a v2 to fix this, and feel free to include:
>
> Reviewed-by: Barry Song <baohua@xxxxxxxxxx>
>
Reviewed-by: Uladzislau Rezki (Sony) <urezki@xxxxxxxxx>
--
Uladzislau Rezki