summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorLuo Meng <luomeng12@huawei.com>2022-11-29 05:48:48 +0300
committerMike Snitzer <snitzer@kernel.org>2022-11-30 21:29:34 +0300
commite4b5957c6f749a501c464f92792f1c8e26b61a94 (patch)
tree48b75f315964f6cbf01328cf991dcd4579a35bbf /drivers/md
parent88430ebcbc0ec637b710b947738839848c20feff (diff)
downloadlinux-e4b5957c6f749a501c464f92792f1c8e26b61a94.tar.xz
dm clone: Fix UAF in clone_dtr()
Dm_clone also has the same UAF problem when dm_resume() and dm_destroy() are concurrent. Therefore, cancelling timer again in clone_dtr(). Cc: stable@vger.kernel.org Fixes: 7431b7835f554 ("dm: add clone target") Signed-off-by: Luo Meng <luomeng12@huawei.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-clone-target.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-clone-target.c b/drivers/md/dm-clone-target.c
index 2f1cc66d2641..29e0b85eeaf0 100644
--- a/drivers/md/dm-clone-target.c
+++ b/drivers/md/dm-clone-target.c
@@ -1958,6 +1958,7 @@ static void clone_dtr(struct dm_target *ti)
mempool_exit(&clone->hydration_pool);
dm_kcopyd_client_destroy(clone->kcopyd_client);
+ cancel_delayed_work_sync(&clone->waker);
destroy_workqueue(clone->wq);
hash_table_exit(clone);
dm_clone_metadata_close(clone->cmd);