projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
174fe38
)
mtd: don't lock when recursively deleting partitions
author
David Bauer
<mail@david-bauer.net>
Wed, 17 Feb 2021 19:53:20 +0000
(20:53 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 14 May 2021 07:50:09 +0000
(09:50 +0200)
[ 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
patch
|
blob
|
history
diff --git
a/drivers/mtd/mtdpart.c
b/drivers/mtd/mtdpart.c
index c3575b686f796022c6d4d9c3b39dc7eafa8bcd56..95d47422bbf2039f9e92bc7d09e08c548d7e3b0a 100644
(file)
--- a/
drivers/mtd/mtdpart.c
+++ b/
drivers/mtd/mtdpart.c
@@
-331,7
+331,7
@@
static int __del_mtd_partitions(struct mtd_info *mtd)
list_for_each_entry_safe(child, next, &mtd->partitions, part.node) {
if (mtd_has_partitions(child))
- del_mtd_partitions(child);
+
__
del_mtd_partitions(child);
pr_info("Deleting %s MTD partition\n", child->name);
ret = del_mtd_device(child);