Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 18776c73 authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Alasdair G Kergon
Browse files

dm raid1: flush workqueue before destruction



We queue work on keventd queue --- so this queue must be flushed in the
destructor. Otherwise, keventd could access mirror_set after it was freed.

Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Cc: stable@kernel.org
parent 4ffaf869
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1032,6 +1032,7 @@ static void mirror_dtr(struct dm_target *ti)

	del_timer_sync(&ms->timer);
	flush_workqueue(ms->kmirrord_wq);
	flush_scheduled_work();
	dm_kcopyd_client_destroy(ms->kcopyd_client);
	destroy_workqueue(ms->kmirrord_wq);
	free_context(ms, ti, ms->nr_mirrors);