lkml.org 
[lkml]   [2024]   [Apr]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] block: fix overflow in blk_ioctl_discard()
From


在 2024/4/2 20:32, Christoph Hellwig 写道:
> On Fri, Mar 29, 2024 at 09:23:19AM +0800, linan666@huaweicloud.com wrote:
>> From: Li Nan <linan122@huawei.com>
>>
>> There is no check for overflow of 'start + len' in blk_ioctl_discard().
>> Hung task occurs if submit an discard ioctl with the following param:
>> start = 0x80000000000ff000, len = 0x8000000000fff000;
>> Add the overflow validation now.
>
> Looks good:
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Can you wire up a testcase in blktests for this condition?
>

It's my pleasure, I will add testcase later.

>
> .

--
Thanks,
Nan


\
 
 \ /
  Last update: 2024-05-27 16:20    [W:0.652 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site