summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2008-11-14 00:38:52 +0100
committerAlasdair G Kergon <agk@redhat.com>2008-11-14 00:38:52 +0100
commit18776c7316545482a02bfaa2629a2aa1afc48357 (patch)
treeecd30db869eff5968921af7df8f055794ed3730f /drivers/md
parentMerge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/ke... (diff)
downloadlinux-18776c7316545482a02bfaa2629a2aa1afc48357.tar.xz
linux-18776c7316545482a02bfaa2629a2aa1afc48357.zip
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: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Alasdair G Kergon <agk@redhat.com> Cc: stable@kernel.org
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-raid1.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 9d7b53ed75b2..ec43f9fa4b2a 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -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);