android_kernel_samsung_sm8650/drivers/mtd
Zhihao Cheng 91aeb418b9 ubi: Refuse attaching if mtd's erasesize is 0
[ Upstream commit 017c73a34a661a861712f7cc1393a123e5b2208c ]

There exists mtd devices with zero erasesize, which will trigger a
divide-by-zero exception while attaching ubi device.
Fix it by refusing attaching if mtd's erasesize is 0.

Fixes: 801c135ce7 ("UBI: Unsorted Block Images")
Reported-by: Yu Hao <yhao016@ucr.edu>
Link: https://lore.kernel.org/lkml/977347543.226888.1682011999468.JavaMail.zimbra@nod.at/T/
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 22:00:39 +02:00
..
chips mtd: cfi_cmdset_0002: Rename chip_ready variables 2022-04-28 10:17:22 +02:00
devices mtd: add ECC error accounting for each read request 2022-09-21 10:38:09 +02:00
hyperbus mtd: hyperbus: rpc-if: Fix RPM imbalance in probe error path 2022-06-24 20:47:36 +02:00
lpddr mtd: lpddr2_nvm: Fix possible null-ptr-deref 2022-12-31 13:32:12 +01:00
maps mtd: maps: pxa2xx-flash: fix memory leak in probe 2022-12-31 13:32:15 +01:00
nand mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller 2023-09-19 12:28:06 +02:00
parsers mtd: parsers: refer to ARCH_BCMBCA instead of ARCH_BCM4908 2023-07-19 16:22:16 +02:00
spi-nor mtd: spi-nor: Correct flags for Winbond w25q128 2023-09-19 12:28:06 +02:00
tests treewide: use get_random_bytes() when possible 2022-10-11 17:42:58 -06:00
ubi ubi: Refuse attaching if mtd's erasesize is 0 2023-10-10 22:00:39 +02:00
ftl.c mtd: ftl: use container_of() rather than cast 2022-09-19 18:14:53 +02:00
inftlcore.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c block: remove blk_cleanup_disk 2022-06-28 06:33:15 -06:00
mtdblock_ro.c
mtdblock.c mtdblock: tolerate corrected bit-flips 2023-04-20 12:35:06 +02:00
mtdchar.c mtdchar: mark bits of ioctl handler noinline 2023-06-09 10:34:24 +02:00
mtdconcat.c mtd: fix repeated word in comment 2022-09-20 10:40:30 +02:00
mtdcore.c mtd: core: fix error path for nvmem provider 2023-05-11 23:03:40 +09:00
mtdcore.h
mtdoops.c mtd: mtdoops: Add a timestamp to the mtdoops header. 2022-04-26 09:27:12 +02:00
mtdpart.c mtd: mtdpart: Don't create platform device that'll never probe 2023-03-10 09:33:38 +01:00
mtdpstore.c mtd: Fix a typo in a comment 2022-09-19 18:14:53 +02:00
mtdsuper.c
mtdswap.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
nftlcore.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
nftlmount.c
rfd_ftl.c
sm_ftl.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
sm_ftl.h
ssfdc.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00