summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2015-07-22 10:20:07 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 19:26:14 +0200
commit18c45d9c8e9a8449f73b333eb1dd354d88ceb186 (patch)
tree6cf7281220e22726f31f12fa4f915378bd3944af /drivers
parentae286448cf64d37128b74c72b9b5435da7e4ba17 (diff)
md: flush ->event_work before stopping array.
commit ee5d004fd0591536a061451eba2b187092e9127c upstream. 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> Fixes: 9d09e663d550 ("dm: raid456 basic support") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-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 e4621511d118..e8c44fcb1ad1 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5365,6 +5365,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;