提交 f50cb2cb 编写于 作者: L Luo Meng 提交者: Mike Snitzer

dm integrity: Fix UAF in dm_integrity_dtr()

Dm_integrity also has the same UAF problem when dm_resume()
and dm_destroy() are concurrent.

Therefore, cancelling timer again in dm_integrity_dtr().

Cc: stable@vger.kernel.org
Fixes: 7eada909 ("dm: add integrity target")
Signed-off-by: NLuo Meng <luomeng12@huawei.com>
Signed-off-by: NMike Snitzer <snitzer@kernel.org>
上级 6a459d8e
...@@ -4558,6 +4558,8 @@ static void dm_integrity_dtr(struct dm_target *ti) ...@@ -4558,6 +4558,8 @@ static void dm_integrity_dtr(struct dm_target *ti)
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress)); BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
BUG_ON(!list_empty(&ic->wait_list)); BUG_ON(!list_empty(&ic->wait_list));
if (ic->mode == 'B')
cancel_delayed_work_sync(&ic->bitmap_flush_work);
if (ic->metadata_wq) if (ic->metadata_wq)
destroy_workqueue(ic->metadata_wq); destroy_workqueue(ic->metadata_wq);
if (ic->wait_wq) if (ic->wait_wq)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册