* FAILED: patch "[PATCH] md: flush ->event_work before stopping array." failed to apply to 3.14-stable tree
@ 2015-09-26 17:10 gregkh
2015-09-30 3:11 ` [PATCH 3.1[04]-stable] md: flush ->event_work before stopping array Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: gregkh @ 2015-09-26 17:10 UTC (permalink / raw)
To: neilb, heinzm; +Cc: stable
The patch below does not apply to the 3.14-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
>From ee5d004fd0591536a061451eba2b187092e9127c Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.com>
Date: Wed, 22 Jul 2015 10:20:07 +1000
Subject: [PATCH] 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")
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;
^ permalink raw reply related [flat|nested] 3+ messages in thread* [PATCH 3.1[04]-stable] md: flush ->event_work before stopping array.
2015-09-26 17:10 FAILED: patch "[PATCH] md: flush ->event_work before stopping array." failed to apply to 3.14-stable tree gregkh
@ 2015-09-30 3:11 ` Neil Brown
2015-10-02 10:02 ` Jiri Slaby
0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2015-09-30 3:11 UTC (permalink / raw)
To: gregkh, heinzm; +Cc: stable
[-- Attachment #1: Type: text/plain, Size: 1047 bytes --]
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>
Cc: stable@vger.kernel.org (2.6.38+ please delay 2 weeks after -final release)
Fixes: 9d09e663d550 ("dm: raid456 basic support")
---
Here is the patch rebased on 3.14 as requested.
This same patch applies to 3.10 too.
Thanks.
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 4ad5cc4e63e8..4bb537a35428 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5285,6 +5285,8 @@ EXPORT_SYMBOL_GPL(md_stop_writes);
static void __md_stop(struct mddev *mddev)
{
mddev->ready = 0;
+ /* Ensure ->event_work is done */
+ flush_workqueue(md_misc_wq);
mddev->pers->stop(mddev);
if (mddev->pers->sync_request && mddev->to_remove == NULL)
mddev->to_remove = &md_redundancy_group;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 3.1[04]-stable] md: flush ->event_work before stopping array.
2015-09-30 3:11 ` [PATCH 3.1[04]-stable] md: flush ->event_work before stopping array Neil Brown
@ 2015-10-02 10:02 ` Jiri Slaby
0 siblings, 0 replies; 3+ messages in thread
From: Jiri Slaby @ 2015-10-02 10:02 UTC (permalink / raw)
To: Neil Brown, gregkh, heinzm; +Cc: stable
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 09/30/2015, 05:11 AM, Neil Brown wrote:
>
> 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> Cc: stable@vger.kernel.org (2.6.38+
> please delay 2 weeks after -final release) Fixes: 9d09e663d550
> ("dm: raid456 basic support")
Applied to 3.12. Thanks!
- --
js
suse labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBCAAGBQJWDlY5AAoJEL0lsQQGtHBJHfIP/1Uh6W27/UCBUOi/IRb+tzIv
N7Mxa0BfalrxsvVCHx0PoSJtQVqnvE+U0ZuFSnfFMOQNbyXBVYMfM2usJG5V/Us8
lSkctYgxA6wRhZg3TwCFNPs+wKEdqxlFuNL0C3/3esQR2JWA7AuRz8/vZc3wxOgL
RmwNictTJhV1B2kmAzViRyqM93H2JObPMtOjoQyEQGfnV6AOzTthjW8v7acAA+i+
8gTGkP5D17sZv33WaLXoUy/aKbRZtcVNdrIc1V9XD6W3o0EiHUhuUpA+wRz3AXh1
tTyjq09PCz4SWwuUhiYWKfBSpBY6wxHub6+DUHEQbXh55TzJvfBIcnbsK5TOqjpp
RuYwqG28D43IHfW/BffsSIQIayXZ/ZfSXtVV+oRkhY4P9MrMAQ7T/WeLhZNJq71S
pHxAu5RNPGHtVHs+K/j8M/+f8FJ0hCCOLEJY1La7lt4V3yjMsq5Z5/B9UTHp74EG
mZJZfEsypFfGSLM4sT1406d/Dz/cqA82bexNzZgGdMOZ7IT1e9fnQ42AOGWQqJdD
uPg5uQgL+mAjzs00oPdnLhdSIVYFQh4FrGz2Fpv1W+m4chtPu5AkUbUJA1tdqVep
PZInXfmgdfu05tP2Dqn1d6fe/YTS2W/gBYhDrVVT5Eb/Fk73AXCF1RkJHVMTVXOn
bjmtvqpsjQnT5MtSbUq/
=B7xJ
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-10-02 10:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-26 17:10 FAILED: patch "[PATCH] md: flush ->event_work before stopping array." failed to apply to 3.14-stable tree gregkh
2015-09-30 3:11 ` [PATCH 3.1[04]-stable] md: flush ->event_work before stopping array Neil Brown
2015-10-02 10:02 ` Jiri Slaby
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).