linux-stable/drivers/mtd
Zhihao Cheng 0ea2a63497 ubi: Refuse attaching if mtd's erasesize is 0
[ Upstream commit 017c73a34a ]

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 21:59:06 +02:00
..
chips
devices
hyperbus
lpddr
maps mtd: maps: pxa2xx-flash: fix memory leak in probe 2022-12-31 13:14:12 +01:00
nand mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller 2023-09-23 11:10:00 +02:00
parsers
spi-nor mtd: spi-nor: Check bus width while setting QE bit 2023-09-19 12:22:49 +02:00
tests
ubi ubi: Refuse attaching if mtd's erasesize is 0 2023-10-10 21:59:06 +02:00
ftl.c
inftlcore.c
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c
mtdblock.c mtdblock: tolerate corrected bit-flips 2023-04-20 12:13:52 +02:00
mtdblock_ro.c
mtdchar.c
mtdconcat.c
mtdcore.c mtd: core: fix error path for nvmem provider 2023-05-11 23:00:39 +09:00
mtdcore.h
mtdoops.c
mtdpart.c
mtdpstore.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c