On 12/23/23 5:32 PM, Coly Li wrote: >> 2023?12?24? 08:28?Coly Li <col...@suse.de> ??? >> >> 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.we...@intel.com> >> Signed-off-by: Coly Li <col...@suse.de> >> Link: >> https://lore.kernel.org/nvdimm/3035e75a-9be0-4bc3-8d4a-6e52c207f...@leemhuis.info/ >> Cc: Dan Williams <dan.j.willi...@intel.com> >> Cc: Geliang Tang <geliang.t...@suse.com> >> Cc: Hannes Reinecke <h...@suse.de> >> Cc: Jens Axboe <ax...@kernel.dk> >> Cc: NeilBrown <ne...@suse.de> >> Cc: Vishal L Verma <vishal.l.ve...@intel.com> >> Cc: Xiao Ni <x...@redhat.com> >> --- >> 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.
Yep, we're still a few weeks out, so not a problem. -- Jens Axboe