summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2015-07-22 03:20:07 +0300
committerNeilBrown <neilb@suse.com>2015-07-22 07:09:29 +0300
commitee5d004fd0591536a061451eba2b187092e9127c (patch)
tree79283cce6691fa2ce9438c470c5984593438abcd /drivers/md
parent299b0685e31c9f3dcc2d58ee3beca761a40b44b3 (diff)
downloadlinux-ee5d004fd0591536a061451eba2b187092e9127c.tar.xz
md: flush ->event_work before stopping array.
The 'event_work' worker used by dm-raid may still be running when the array is stopped. This can result in an oops. So flush the workqueue on which it is run after detaching and before destroying the device. Reported-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: NeilBrown <neilb@suse.com> Cc: stable@vger.kernel.org (2.6.38+ please delay 2 weeks after -final release) Fixes: 9d09e663d550 ("dm: raid456 basic support")
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index df92d30ca054..5025b3ec13cd 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5382,6 +5382,8 @@ static void __md_stop(struct mddev *mddev)
{
struct md_personality *pers = mddev->pers;
mddev_detach(mddev);
+ /* Ensure ->event_work is done */
+ flush_workqueue(md_misc_wq);
spin_lock(&mddev->lock);
mddev->ready = 0;
mddev->pers = NULL;