[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <df73b658-0e94-edd7-40ef-4f0d21feec28@huaweicloud.com>
Date: Sat, 20 May 2023 08:43:52 +0800
From: Li Nan <linan666@...weicloud.com>
To: Song Liu <song@...nel.org>, linan666@...weicloud.com
Cc: neilb@...e.de, Rob.Becker@...erbed.com, linux-raid@...r.kernel.org,
linux-kernel@...r.kernel.org, yukuai3@...wei.com,
yi.zhang@...wei.com, houtao1@...wei.com, yangerkun@...wei.com
Subject: Re: [PATCH OLK-5.10 v3 2/4] md/raid10: fix overflow in
safe_delay_store
在 2023/5/20 6:01, Song Liu 写道:
> On Mon, May 15, 2023 at 6:49 AM <linan666@...weicloud.com> wrote:
>>
>> From: Li Nan <linan122@...wei.com>
>>
>> There is no input check when echo md/safe_mode_delay and overflow will
>> occur. There is risk of overflow in strict_strtoul_scaled(), too. Fix it
>> by using kstrtoul instead of parsing word one by one.
>>
>> Fixes: 72e02075a33f ("md: factor out parsing of fixed-point numbers")
>> Signed-off-by: Li Nan <linan122@...wei.com>
>> Reviewed-by: Yu Kuai <yukuai3@...wei.com>
>> ---
>> drivers/md/md.c | 76 +++++++++++++++++++++++++++++++------------------
>> 1 file changed, 48 insertions(+), 28 deletions(-)
>
> This patch adds more complexity, which I don't really think is necessary.
> Can we just check for overflow in safe_delay_store()?
Yes, checking overflow is more convenient, I will check it in v4.
--
Thanks,
Nan
Powered by blists - more mailing lists