dm clone: Fix UAF in clone_dtr()
commite4b5957c6fupstream. 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:7431b7835f("dm: add clone target") Signed-off-by: Luo Meng <luomeng12@huawei.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a506b5c927
commit
342cfd8426
@@ -1966,6 +1966,7 @@ static void clone_dtr(struct dm_target *ti)
|
|||||||
|
|
||||||
mempool_exit(&clone->hydration_pool);
|
mempool_exit(&clone->hydration_pool);
|
||||||
dm_kcopyd_client_destroy(clone->kcopyd_client);
|
dm_kcopyd_client_destroy(clone->kcopyd_client);
|
||||||
|
cancel_delayed_work_sync(&clone->waker);
|
||||||
destroy_workqueue(clone->wq);
|
destroy_workqueue(clone->wq);
|
||||||
hash_table_exit(clone);
|
hash_table_exit(clone);
|
||||||
dm_clone_metadata_close(clone->cmd);
|
dm_clone_metadata_close(clone->cmd);
|
||||||
|
|||||||
Reference in New Issue
Block a user