aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2021-02-17 03:24:07 +0100
committerDavid Bauer <mail@david-bauer.net>2021-02-18 01:16:40 +0100
commit5408399fcb468164a76df8cea9505203c21f4158 (patch)
treea1011e8204fda7e749b55da6581fe122a3163baf /target
parent0621b23efb4f88638052a6465cc8e96a6eb7d5e0 (diff)
downloadupstream-5408399fcb468164a76df8cea9505203c21f4158.tar.gz
upstream-5408399fcb468164a76df8cea9505203c21f4158.tar.bz2
upstream-5408399fcb468164a76df8cea9505203c21f4158.zip
generic: don't lock when recursively deleting partitions
When recursively deleting partitions, don't acquire the masters partition lock twice. Otherwise the process endy up in a deadlocked state. Signed-off-by: David Bauer <mail@david-bauer.net>
Diffstat (limited to 'target')
-rw-r--r--target/linux/generic/pending-5.10/499-mtd-don-t-lock-when-recursively-deleting-partitions.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/target/linux/generic/pending-5.10/499-mtd-don-t-lock-when-recursively-deleting-partitions.patch b/target/linux/generic/pending-5.10/499-mtd-don-t-lock-when-recursively-deleting-partitions.patch
new file mode 100644
index 0000000000..505131b684
--- /dev/null
+++ b/target/linux/generic/pending-5.10/499-mtd-don-t-lock-when-recursively-deleting-partitions.patch
@@ -0,0 +1,24 @@
+From: David Bauer <mail@david-bauer.net>
+Date: Wed, 17 Feb 2021 03:21:39 +0100
+Subject: [PATCH] mtd: don't lock when recursively deleting partitions
+
+When recursively deleting partitions, don't acquire the masters
+partition lock twice. Otherwise the process endy up in a deadlocked
+state.
+
+Signed-off-by: David Bauer <mail@david-bauer.net>
+---
+ drivers/mtd/mtdpart.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mtd/mtdpart.c
++++ b/drivers/mtd/mtdpart.c
+@@ -474,7 +474,7 @@ static int __del_mtd_partitions(struct m
+
+ 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);