Patch "dm: free io_barrier after blk_cleanup_queue call" has been added to the 4.8-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
dm: free io_barrier after blk_cleanup_queue call
to the 4.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-free-io_barrier-after-blk_cleanup_queue-call.patch
and it can be found in the queue-4.8 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
d09960b0032174eb493c4c13be5b9c9ef36dc9a7Mon Sep 17 00:00:00 2001
From: Tahsin Erdogan <[email protected]>
Date: Mon, 10 Oct 2016 05:35:19 -0700
Subject: dm: free io_barrier after blk_cleanup_queue call
From: Tahsin Erdogan <[email protected]>
commit d09960b0032174eb493c4c13be5b9c9ef36dc9a7 upstream.
dm_old_request_fn() has paths that access md->io_barrier. The party destroying io_barrier should ensure that no future execution of dm_old_request_fn() is possible. Move io_barrier destruction to below blk_cleanup_queue() to ensure this and avoid a NULL pointer crash during request-based DM device shutdown.
--- drivers/md/dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/md/dm.c +2 -2
@@ -1423,8 +1423,6 @@ static void cleanup_mapped_device(structif (md->bs)bioset_free (md->bs); -cleanup_srcu_struct (&md->io_barrier); -if (md->disk) {spin_lock (&_minor_lock); md->disk->private_data =NULL ;
@@ -1436,6 +1434,8 @@ static void cleanup_mapped_device(structif (md->queue)blk_cleanup_queue (md->queue); +cleanup_srcu_struct (&md->io_barrier); +if (md->bdev) {bdput (md->bdev); md->bdev =NULL ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.8/dm-free-io_barrier-after-blk_cleanup_queue-call.patch