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>
Wed, 18 Jan 2023 08:26:36 +0000 (09:26 +0100)
commit3972ae47d0ee9b5b434af5d0cca6cdfd1e239d4f
treee24727dc297981f287eeefc3a0704a6314d08546
parent786dd14de1dba097c43d8ec23bf7a3ae3451baae
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