linux/drivers/mtd
Fedor Pchelkin 29f2c83182 ubi: eba: properly rollback inside self_check_eba
commit 745d9f4a31 upstream.

In case of a memory allocation failure in the volumes loop we can only
process the already allocated scan_eba and fm_eba array elements on the
error path - others are still uninitialized.

Found by Linux Verification Center (linuxtesting.org).

Fixes: 00abf30415 ("UBI: Add self_check_eba()")
Cc: stable@vger.kernel.org
Signed-off-by: Fedor Pchelkin <pchelkin@ispras.ru>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-19 05:32:04 +02:00
..
chips mtd: cfi_cmdset_0001: Byte swap OTP info 2023-12-08 08:43:26 +01:00
devices mtd: devices: docg3: check the return value of devm_ioremap() in the probe 2022-10-26 13:19:31 +02:00
lpddr mtd: lpddr2_nvm: Fix possible null-ptr-deref 2023-01-18 11:30:12 +01:00
maps mtd: maps: pxa2xx-flash: fix memory leak in probe 2023-01-18 11:30:12 +01:00
nand mtd: rawnand: hynix: fixed typo 2024-06-16 13:23:29 +02:00
parsers
spi-nor spi: cadence-quadspi: fix suspend-resume implementations 2023-05-17 11:13:17 +02:00
tests mtd: make mtd_test.c a separate module 2024-08-19 05:32:00 +02:00
ubi ubi: eba: properly rollback inside self_check_eba 2024-08-19 05:32:04 +02:00
afs.c
ar7part.c
bcm47xxpart.c
bcm63xxpart.c
cmdlinepart.c mtd: parser: cmdline: Fix parsing of part-names with colons 2020-12-30 11:26:15 +01:00
ftl.c
inftlcore.c
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c mtd: Fix gluebi NULL pointer dereference caused by ftl notifier 2024-01-25 14:33:32 -08:00
mtdblock_ro.c
mtdblock.c mtdblock: tolerate corrected bit-flips 2023-04-20 12:04:40 +02:00
mtdchar.c mtd: require write permissions for locking and badblock ioctls 2021-05-22 10:59:29 +02:00
mtdconcat.c
mtdcore.c mtd: Fix device name leak when register device failed in add_mtd_device() 2023-01-18 11:30:10 +01:00
mtdcore.h
mtdoops.c mtd: mtdoops: Don't write panic data twice 2020-10-29 09:55:17 +01:00
mtdpart.c
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c
redboot.c
rfd_ftl.c
sm_ftl.c mtd: sm_ftl: Fix deadlock caused by cancel_work_sync in sm_release 2022-08-25 11:15:14 +02:00
sm_ftl.h
ssfdc.c