dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort
authorMike Snitzer <snitzer@kernel.org>
Wed, 30 Nov 2022 18:26:32 +0000 (13:26 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 11:07:36 +0000 (12:07 +0100)
commit6e237cacda8b4e976849e7bff9fe7dff0e968586
tree122f0f58be8936a2f94c37563e2f5587bee88f24
parent4be6501204c604a3b7a9aeeb96531fb3ab3beb29
dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort

commit 352b837a5541690d4f843819028cf2b8be83d424 upstream.

Same ABBA deadlock pattern fixed in commit 4b60f452ec51 ("dm thin: Fix
ABBA deadlock between shrink_slab and dm_pool_abort_metadata") to
DM-cache's metadata.

Reported-by: Zhihao Cheng <chengzhihao1@huawei.com>
Cc: stable@vger.kernel.org
Fixes: 028ae9f76f29 ("dm cache: add fail io mode and needs_check flag")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/dm-cache-metadata.c