summaryrefslogtreecommitdiff
path: root/tools/lib/python/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorDamien Le Moal <dlemoal@kernel.org>2025-11-13 22:40:26 +0900
committerJens Axboe <axboe@kernel.dk>2025-11-13 09:10:04 -0700
commitc2b8d20628ca789640f64074a642f9440eefc623 (patch)
tree70ec53558c0ac1ba2c0403859c79f683602f6574 /tools/lib/python/kdoc/kdoc_files.py
parentf233339188cd9b1a985fd8410d5811e920fdd4ef (diff)
block: fix NULL pointer dereference in blk_zone_reset_all_bio_endio()
For zoned block devices that do not need zone write plugs (e.g. most device mapper devices that support zones), the disk hash table of zone write plugs is NULL. For such devices, blk_zone_reset_all_bio_endio() should not attempt to scan this has table as that causes a NULL pointer dereference. Fix this by checking that the disk does have zone write plugs using the atomic counter. This is equivalent to checking for a non-NULL hash table but has the advantage to also speed up the execution of blk_zone_reset_all_bio_endio() for devices that do use zone write plugs but do not have any plug in the hash table (e.g. a disk with only full zones). Fixes: efae226c2ef1 ("block: handle zone management operations completions") Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> Signed-off-by: Damien Le Moal <dlemoal@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'tools/lib/python/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions