[<prev] [next>] [day] [month] [year] [list]
Date: Mon, 4 Apr 2022 12:25:58 +0200
From: David Hildenbrand <david@...hat.com>
To: "liupeng (DM)" <liupeng256@...wei.com>, mike.kravetz@...cle.com,
akpm@...ux-foundation.org, yaozhenguo1@...il.com,
linux-mm@...ck.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH v2 2/2] hugetlb: Fix return value of __setup handlers
On 02.04.22 03:33, liupeng (DM) wrote:
>
> On 2022/4/1 18:46, David Hildenbrand wrote:
>> On 01.04.22 12:12, 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 warn or error information before return for
>>> invalid parameter string, just use return '1' to avoid print again.
>>>
>>> Signed-off-by: Peng Liu <liupeng256@...wei.com>
>>> ---
>>> mm/hugetlb.c | 18 ++++++++----------
>>> 1 file changed, 8 insertions(+), 10 deletions(-)
>>>
>>> diff --git a/mm/hugetlb.c b/mm/hugetlb.c
>>> index 9cd746432ca9..6dde34c115c9 100644
>>> --- a/mm/hugetlb.c
>>> +++ b/mm/hugetlb.c
>>> @@ -4131,12 +4131,11 @@ static int __init hugepages_setup(char *s)
>>> int count;
>>> unsigned long tmp;
>>> char *p = s;
>>> - int ret = 1;
>> Adding this in #1 to remove it in #2 is a bit sub-optimal IMHO.
>>
> For #2, which is not necessary for stable, #1 may be needed for stable,
> this is why we split #2 into a single patch.
>
Again, I don't think #1 is stable material, sorry.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists