mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
dm integrity: Fix UAF in dm_integrity_dtr()
commitf50cb2cbabupstream. 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:7eada909bf("dm: add integrity 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:
parent
d9971fa4d8
commit
b6c93cd61a
|
|
@ -4558,6 +4558,8 @@ static void dm_integrity_dtr(struct dm_target *ti)
|
|||
BUG_ON(!RB_EMPTY_ROOT(&ic->in_progress));
|
||||
BUG_ON(!list_empty(&ic->wait_list));
|
||||
|
||||
if (ic->mode == 'B')
|
||||
cancel_delayed_work_sync(&ic->bitmap_flush_work);
|
||||
if (ic->metadata_wq)
|
||||
destroy_workqueue(ic->metadata_wq);
|
||||
if (ic->wait_wq)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user