]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: don't lock when recursively deleting partitions
authorDavid Bauer <mail@david-bauer.net>
Wed, 17 Feb 2021 19:53:20 +0000 (20:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 May 2021 08:49:38 +0000 (10:49 +0200)
commit53b317350620f132998343c695e0292a120d0a5b
tree993b76f85a1099a791cb330d6c74cb3ef81b7fe7
parentb13202c84c4ddec227f7ac304eae180590a57536
mtd: don't lock when recursively deleting partitions

[ Upstream commit cb4543054c5c4fd33df960b41d7b483ebca8e786 ]

When recursively deleting partitions, don't acquire the masters
partition lock twice. Otherwise the process ends up in a deadlocked
state.

Fixes: 46b5889cc2c5 ("mtd: implement proper partition handling")
Signed-off-by: David Bauer <mail@david-bauer.net>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20210217195320.893253-1-mail@david-bauer.net
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mtd/mtdpart.c