aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/interrupts.py
diff options
context:
space:
mode:
authorColy Li <[email protected]>2023-12-24 08:28:20 +0800
committerJens Axboe <[email protected]>2023-12-23 18:38:08 -0700
commit146e843f6b09271233c021b1677e561b7dc16303 (patch)
tree90929cf39bc52a763c6eb450499498d82f16ecfb /scripts/gdb/linux/interrupts.py
parent13d822bf1cba78612b22a65b91cd6d4d443b6254 (diff)
badblocks: avoid checking invalid range in badblocks_check()
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 <[email protected]> Signed-off-by: Coly Li <[email protected]> Link: https://lore.kernel.org/nvdimm/[email protected]/ Cc: Dan Williams <[email protected]> Cc: Geliang Tang <[email protected]> Cc: Hannes Reinecke <[email protected]> Cc: Jens Axboe <[email protected]> Cc: NeilBrown <[email protected]> Cc: Vishal L Verma <[email protected]> Cc: Xiao Ni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/interrupts.py')
0 files changed, 0 insertions, 0 deletions