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

dm cache: Fix UAF in destroy()

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

Therefore, cancelling timer again in destroy().

Cc: stable@vger.kernel.org
Fixes: c6b4fcba ("dm: add cache target")
Signed-off-by: NLuo Meng <luomeng12@huawei.com>
Signed-off-by: NMike Snitzer <snitzer@kernel.org>
上级 e4b5957c
...@@ -1887,6 +1887,7 @@ static void destroy(struct cache *cache) ...@@ -1887,6 +1887,7 @@ static void destroy(struct cache *cache)
if (cache->prison) if (cache->prison)
dm_bio_prison_destroy_v2(cache->prison); dm_bio_prison_destroy_v2(cache->prison);
cancel_delayed_work_sync(&cache->waker);
if (cache->wq) if (cache->wq)
destroy_workqueue(cache->wq); destroy_workqueue(cache->wq);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册