diff options
author | Mike Snitzer <snitzer@kernel.org> | 2022-06-10 15:07:48 -0400 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2022-06-10 15:23:54 -0400 |
commit | dddf30564054796696bcd4c462b232a5beacf72c (patch) | |
tree | 28e1f26e4971e5f2df79d3f8f88928286f568ed3 /lib/debug_locks.c | |
parent | d5a37b19983725d2045588cfa3a4699f5b39ae26 (diff) | |
download | linux-dddf30564054796696bcd4c462b232a5beacf72c.tar.bz2 |
dm: fix zoned locking imbalance due to needless check in clone_endio
After the commit ca522482e3ea ("dm: pass NULL bdev to bio_alloc_clone"),
clone_endio() only calls dm_zone_endio() when DM targets remap the
clone bio's bdev to something other than the md->disk->part0 default.
However, if a DM target (e.g. dm-crypt) stacked ontop of a dm-zoned
does not remap the clone bio using bio_set_dev() then dm_zone_endio()
is not called at completion of the bios and zone locks are not
properly unlocked. This triggers a hang, in dm_zone_map_bio(), when
blktests block/004 is run for dm-crypt on zoned block devices. To
avoid the hang, simply remove the clone_endio() check that verifies
the target remapped the clone bio to a device other than the default.
Fixes: ca522482e3ea ("dm: pass NULL bdev to bio_alloc_clone")
Reported-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'lib/debug_locks.c')
0 files changed, 0 insertions, 0 deletions