linux-stable/drivers/mtd/ubi
Fedor Pchelkin a7a59a1234 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:45:16 +02:00
..
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
debug.h
eba.c ubi: eba: properly rollback inside self_check_eba 2024-08-19 05:45:16 +02: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: correct the calculation of fastmap size 2024-04-10 16:18:36 +02:00
gluebi.c
io.c
kapi.c
Kconfig
Makefile
misc.c
ubi-media.h
ubi.h
upd.c
vmt.c ubi: Fix possible null-ptr-deref in ubi_free_volume() 2023-03-11 13:57:25 +01:00
vtbl.c ubi: Check for too small LEB size in VTBL code 2024-04-10 16:18:35 +02:00
wl.c ubi: Fix deadlock caused by recursively holding work_sem 2023-04-20 12:13:56 +02:00
wl.h