]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.18-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 20:56:24 +0000 (12:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 20:56:24 +0000 (12:56 -0800)
added patches:
dm-remove-duplicate-dm_get_live_table-in-__dm_destroy.patch

queue-3.18/dm-remove-duplicate-dm_get_live_table-in-__dm_destroy.patch [new file with mode: 0644]
queue-3.18/series

diff --git a/queue-3.18/dm-remove-duplicate-dm_get_live_table-in-__dm_destroy.patch b/queue-3.18/dm-remove-duplicate-dm_get_live_table-in-__dm_destroy.patch
new file mode 100644 (file)
index 0000000..7a95678
--- /dev/null
@@ -0,0 +1,33 @@
+From undefined@pobox.com  Sun Nov 11 12:53:49 2018
+From: Corey Wright <undefined@pobox.com>
+Date: Sun, 11 Nov 2018 02:22:36 -0600
+Subject: dm: remove duplicate dm_get_live_table() in __dm_destroy()
+To: stable@vger.kernel.org
+Cc: Sasha Levin <sashal@kernel.org>
+Message-ID: <20181111022236.40ef83f0781111eaaa55e7d4@pobox.com>
+
+From: Corey Wright <undefined@pobox.com>
+
+[3.18.y only, to fix a previous patch]
+
+__dm_destroy() takes io_barrier SRCU lock (dm_get_live_table) twice
+which leads to a deadlock.  Remove taking lock before holding
+suspend_lock to prevent a different potential deadlock.
+
+Signed-off-by: Corey Wright <undefined@pobox.com>
+Fixes: e1db66a5fdcc ("dm: fix AB-BA deadlock in __dm_destroy()")
+Cc: Sasha Levin <sashal@kernel.org>
+---
+ drivers/md/dm.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/md/dm.c
++++ b/drivers/md/dm.c
+@@ -2589,7 +2589,6 @@ static void __dm_destroy(struct mapped_d
+       might_sleep();
+       spin_lock(&_minor_lock);
+-      map = dm_get_live_table(md, &srcu_idx);
+       idr_replace(&_minor_idr, MINOR_ALLOCED, MINOR(disk_devt(dm_disk(md))));
+       set_bit(DMF_FREEING, &md->flags);
+       spin_unlock(&_minor_lock);
index 0e01a12b3d31c373dbebb3d26f6c3b22fa2c0722..267e043660a7cb7fca794f5eac2fe8a5bdd58429 100644 (file)
@@ -53,3 +53,4 @@ media-em28xx-use-a-default-format-if-try_fmt-fails.patch
 media-em28xx-fix-input-name-for-terratec-av-350.patch
 media-em28xx-make-v4l2-compliance-happier-by-starting-sequence-on-zero.patch
 cramfs-fix-abad-comparison-when-wrap-arounds-occur.patch
+dm-remove-duplicate-dm_get_live_table-in-__dm_destroy.patch