This is a note to let you know that I've just added the patch titled mtd: Fixed breaking list in __mtd_del_partition. to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mtd-fixed-breaking-list-in-__mtd_del_partition.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From 2966daf7d253d9904b337b040dd7a43472858b8a Mon Sep 17 00:00:00 2001 From: Andreas Oetken <ennoerlangen@xxxxxxxxx> Date: Tue, 2 Nov 2021 18:26:04 +0100 Subject: mtd: Fixed breaking list in __mtd_del_partition. From: Andreas Oetken <ennoerlangen@xxxxxxxxx> commit 2966daf7d253d9904b337b040dd7a43472858b8a upstream. 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@xxxxxxxxxxxxxxxxxx> Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Miquel Raynal <miquel.raynal@xxxxxxxxxxx> Link: https://lore.kernel.org/linux-mtd/20211102172604.2921065-1-andreas.oetken@xxxxxxxxxxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/mtd/mtdpart.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c @@ -313,7 +313,7 @@ static int __mtd_del_partition(struct mt if (err) return err; - list_del(&child->part.node); + list_del(&mtd->part.node); free_partition(mtd); return 0; Patches currently in stable-queue which might be from ennoerlangen@xxxxxxxxx are queue-5.10/mtd-fixed-breaking-list-in-__mtd_del_partition.patch