linux-stable/drivers/mtd
Sven Eckelmann 639a82434f mtd: parser: cmdline: Fix parsing of part-names with colons
Some devices (especially QCA ones) are already using hardcoded partition
names with colons in it. The OpenMesh A62 for example provides following
mtd relevant information via cmdline:

  root=31:11 mtdparts=spi0.0:256k(0:SBL1),128k(0:MIBIB),384k(0:QSEE),64k(0:CDT),64k(0:DDRPARAMS),64k(0:APPSBLENV),512k(0:APPSBL),64k(0:ART),64k(custom),64k(0:KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive) rootfsname=rootfs rootwait

The change to split only on the last colon between mtd-id and partitions
will cause newpart to see following string for the first partition:

  KEYS),0x002b0000(kernel),0x00c80000(rootfs),15552k(inactive)

Such a partition list cannot be parsed and thus the device fails to boot.

Avoid this behavior by making sure that the start of the first part-name
("(") will also be the last byte the mtd-id split algorithm is using for
its colon search.

Fixes: eb13fa0227 ("mtd: parser: cmdline: Support MTD names containing one or more colons")
Cc: stable@vger.kernel.org
Cc: Ron Minnich <rminnich@google.com>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201124062506.185392-1-sven@narfation.org
2020-12-07 12:14:32 +01:00
..
chips mtd: Replace HTTP links with HTTPS ones 2020-08-02 22:17:19 +02:00
devices mtd: devices: powernv_flash: Add function names to headers and fix 'dev' 2020-11-20 12:37:33 +01:00
hyperbus mtd: hyperbus: Fix build failure when only RPCIF_HYPERBUS is enabled 2020-10-12 21:12:08 +02:00
lpddr mtd: lpddr: fix excessive stack usage with clang 2020-08-27 14:36:07 +02:00
maps mtd: maps: vmu-flash: fix typos for struct memcard 2020-10-02 09:08:27 +02:00
nand mtd: onenand: Fix some kernel-doc misdemeanours 2020-11-20 12:37:33 +01:00
parsers mtd: parser: cmdline: Fix parsing of part-names with colons 2020-12-07 12:14:32 +01:00
spi-nor mtd: spi-nor: hisi-sfc: Demote non-conformant kernel-doc 2020-11-20 12:37:30 +01:00
tests treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 326 2019-06-05 17:37:06 +02:00
ubi mtd: ubi: gluebi: Fix misnamed function parameter documentation 2020-11-20 12:37:32 +01:00
ftl.c
inftlcore.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
inftlmount.c mtd: fix spelling mistake "BlockMultiplerBits" -> "BlockMultiplierBits" 2020-03-11 14:49:30 +01:00
Kconfig mtd: Support kmsg dumper based on pstore/blk 2020-05-31 19:49:01 -07:00
Makefile mtd: Support kmsg dumper based on pstore/blk 2020-05-31 19:49:01 -07:00
mtd_blkdevs.c
mtdblock.c mtd: clear cache_state to avoid writing to bad blocks repeatedly 2020-06-05 10:16:14 +02:00
mtdblock_ro.c
mtdchar.c mtd: remove unneeded break 2020-10-28 11:58:11 +01:00
mtdconcat.c mtd: mtdconcat: map: remove redundant assignment to variable 'size' 2020-09-11 18:49:34 +02:00
mtdcore.c mtd: Fix misspelled function parameter 'section' 2020-11-20 12:37:30 +01:00
mtdcore.h mtd: Provide fs_context-aware mount_mtd() replacement 2019-09-05 14:34:23 -04:00
mtdoops.c mtd: mtdoops: Don't write panic data twice 2020-09-07 14:22:12 +02:00
mtdpart.c mtd: mtdpart: Fix misdocumented function parameter 'mtd' 2020-11-20 12:37:29 +01:00
mtdpstore.c iov_iter: Move unnecessary inclusion of crypto/hash.h 2020-06-30 09:34:23 -04:00
mtdsuper.c mtd: Kill mount_mtd() 2019-09-05 14:34:26 -04:00
mtdswap.c mtd: no need to check return value of debugfs_create functions 2019-11-14 10:57:38 +01:00
nftlcore.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
nftlmount.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
rfd_ftl.c
sm_ftl.c mtd: sm_ftl: fix NULL pointer warning 2020-01-09 20:09:55 +01:00
sm_ftl.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ssfdc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00