Re: [PATCH] mm/hugetlb: fix early boot crash on parameters without '=' separator
From: Muchun Song
Date: Thu Apr 09 2026 - 07:05:39 EST
> On Apr 9, 2026, at 18:54, Thorsten Blum <thorsten.blum@xxxxxxxxx> wrote:
>
> If hugepages, hugepagesz, or default_hugepagesz are specified on the
> kernel command line without the '=' separator, early parameter parsing
> passes NULL to hugetlb_add_param(), which dereferences it in strlen()
> and can crash the system during early boot.
>
> Reject NULL values in hugetlb_add_param() and return -EINVAL instead.
>
> Fixes: 5b47c02967ab ("mm/hugetlb: convert cmdline parameters from setup to early")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Thorsten Blum <thorsten.blum@xxxxxxxxx>
Reviewed-by: Muchun Song <muchun.song@xxxxxxxxx>
Thanks.