OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa55b7d
)
mtd: Fixed breaking list in __mtd_del_partition.
author
Andreas Oetken
<ennoerlangen@gmail.com>
Tue, 2 Nov 2021 17:26:04 +0000
(18:26 +0100)
committer
Miquel Raynal
<miquel.raynal@bootlin.com>
Fri, 3 Dec 2021 13:27:18 +0000
(14:27 +0100)
Not the child partition should be removed from the partition list
but the partition itself. Otherwise the partition list gets broken
and any subsequent remove operations leads to a kernel panic.
Fixes:
46b5889cc2c5
("mtd: implement proper partition handling")
Signed-off-by: Andreas Oetken <andreas.oetken@siemens-energy.com>
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link:
https://lore.kernel.org/linux-mtd/20211102172604.2921065-1-andreas.oetken@siemens-energy.com
drivers/mtd/mtdpart.c
patch
|
blob
|
history
diff --git
a/drivers/mtd/mtdpart.c
b/drivers/mtd/mtdpart.c
index
04af12b
..
357661b
100644
(file)
--- a/
drivers/mtd/mtdpart.c
+++ b/
drivers/mtd/mtdpart.c
@@
-312,7
+312,7
@@
static int __mtd_del_partition(struct mtd_info *mtd)
if (err)
return err;
- list_del(&
chil
d->part.node);
+ list_del(&
mt
d->part.node);
free_partition(mtd);
return 0;