All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mtd: don't lock when recursively deleting partitions
@ 2021-02-17 19:53 David Bauer
  2021-03-02 17:14 ` Miquel Raynal
  0 siblings, 1 reply; 2+ messages in thread
From: David Bauer @ 2021-02-17 19:53 UTC (permalink / raw)
  To: miquel.raynal, richard, vigneshr, linux-mtd

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

Fixes commit 46b5889cc2c5 ("mtd: implement proper partition handling")

Signed-off-by: David Bauer <mail@david-bauer.net>
---
 drivers/mtd/mtdpart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c
index c3575b686f79..95d47422bbf2 100644
--- 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);
-- 
2.30.1


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mtd: don't lock when recursively deleting partitions
  2021-02-17 19:53 [PATCH] mtd: don't lock when recursively deleting partitions David Bauer
@ 2021-03-02 17:14 ` Miquel Raynal
  0 siblings, 0 replies; 2+ messages in thread
From: Miquel Raynal @ 2021-03-02 17:14 UTC (permalink / raw)
  To: David Bauer, miquel.raynal, richard, vigneshr, linux-mtd

On Wed, 2021-02-17 at 19:53:20 UTC, David Bauer wrote:
> When recursively deleting partitions, don't acquire the masters
> partition lock twice. Otherwise the process ends up in a deadlocked
> state.
> 
> Fixes commit 46b5889cc2c5 ("mtd: implement proper partition handling")
> 
> Signed-off-by: David Bauer <mail@david-bauer.net>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git mtd/next, thanks.

Miquel

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-03 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 19:53 [PATCH] mtd: don't lock when recursively deleting partitions David Bauer
2021-03-02 17:14 ` Miquel Raynal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.