dm: remove duplicate dm_get_live_table() in __dm_destroy()
authorCorey Wright <undefined@pobox.com>
Sun, 11 Nov 2018 08:22:36 +0000 (02:22 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 Nov 2018 06:32:45 +0000 (07:32 +0100)
commit526ba18a5a214926e606b0de19c91c1de6bbd526
treee00ac824838b1e0798a4df2caf961a6d546046b4
parent2b4fc4a191ca24878592e6e9904b83b02873aaaa
dm: remove duplicate dm_get_live_table() in __dm_destroy()

[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