lkml.org 
[lkml]   [2022]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v3 3/4] hugetlb: Fix return value of __setup handlers
From


On 4/13/2022 11:29 AM, Peng Liu wrote:
> When __setup() return '0', using invalid option values causes the
> entire kernel boot option string to be reported as Unknown. Hugetlb
> calls __setup() and will return '0' when set invalid parameter
> string.
>
> The following phenomenon is observed:
> cmdline:
> hugepagesz=1Y hugepages=1
> dmesg:
> HugeTLB: unsupported hugepagesz=1Y
> HugeTLB: hugepages=1 does not follow a valid hugepagesz, ignoring
> Unknown kernel command line parameters "hugepagesz=1Y hugepages=1"
>
> Since hugetlb will print warning/error information before return for
> invalid parameter string, just use return '1' to avoid print again.
>
> Signed-off-by: Peng Liu <liupeng256@huawei.com>

LGTM.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>

\
 
 \ /
  Last update: 2022-04-13 08:39    [W:0.273 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site