Re: [PATCH] badblocks: avoid checking invalid range in badblocks_check()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> 2023年12月24日 08:28,Coly Li <colyli@xxxxxxx> 写道:
> 
> If prev_badblocks() returns '-1', it means no valid badblocks record
> before the checking range. It doesn't make sense to check whether
> the input checking range is overlapped with the non-existed invalid
> front range.
> 
> This patch checkes whether 'prev >= 0' is true before calling
> overlap_front(), to void such invalid operations.
> 
> Fixes: 3ea3354cb9f0 ("badblocks: improve badblocks_check() for multiple ranges handling")
> Reported-and-tested-by: Ira Weiny <ira.weiny@xxxxxxxxx>
> Signed-off-by: Coly Li <colyli@xxxxxxx>
> Link: https://lore.kernel.org/nvdimm/3035e75a-9be0-4bc3-8d4a-6e52c207f277@xxxxxxxxxxxxx/
> Cc: Dan Williams <dan.j.williams@xxxxxxxxx>
> Cc: Geliang Tang <geliang.tang@xxxxxxxx>
> Cc: Hannes Reinecke <hare@xxxxxxx>
> Cc: Jens Axboe <axboe@xxxxxxxxx>
> Cc: NeilBrown <neilb@xxxxxxx>
> Cc: Vishal L Verma <vishal.l.verma@xxxxxxxxx>
> Cc: Xiao Ni <xni@xxxxxxxxxx>
> ---
> block/badblocks.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)

Hi Jens,

Is it possible to take this fix into 6.7 still? Thanks in advance.

Coly Li


[snipped]






[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux