[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181119162629.402065358@linuxfoundation.org>
Date: Mon, 19 Nov 2018 17:29:35 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Sasha Levin <sashal@...nel.org>,
Corey Wright <undefined@...ox.com>
Subject: [PATCH 3.18 53/90] dm: remove duplicate dm_get_live_table() in __dm_destroy()
3.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Corey Wright <undefined@...ox.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@...ox.com>
Fixes: e1db66a5fdcc ("dm: fix AB-BA deadlock in __dm_destroy()")
Cc: Sasha Levin <sashal@...nel.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);
Powered by blists - more mailing lists