WSL2-Linux-Kernel/drivers/mtd/ubi
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
..
Kconfig
Makefile
attach.c
block.c
build.c ubi: Refuse attaching if mtd's erasesize is 0 2023-10-10 21:59:06 +02:00
cdev.c
debug.c ubifs: fix snprintf() checking 2021-06-18 22:04:47 +02:00
debug.h
eba.c ubi: Fix return value overwrite issue in try_write_vid_and_data() 2023-05-11 23:00:18 +09:00
fastmap-wl.c ubi: fastmap: Fix missed fm_anchor PEB in wear-leveling after disabling fastmap 2023-03-11 13:57:25 +01:00
fastmap.c ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool not empty 2022-06-14 18:36:10 +02:00
gluebi.c
io.c
kapi.c
misc.c
ubi-media.h
ubi.h ubi: fastmap: Fix high cpu usage of ubi_bgt by making sure wl_pool not empty 2022-06-14 18:36:10 +02:00
upd.c
vmt.c ubi: Fix possible null-ptr-deref in ubi_free_volume() 2023-03-11 13:57:25 +01:00
vtbl.c
wl.c ubi: Fix deadlock caused by recursively holding work_sem 2023-04-20 12:13:56 +02:00
wl.h