]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ubi: eba: properly rollback inside self_check_eba
authorFedor Pchelkin <pchelkin@ispras.ru>
Thu, 29 Feb 2024 20:42:36 +0000 (23:42 +0300)
committerRichard Weinberger <richard@nod.at>
Fri, 12 Jul 2024 17:42:46 +0000 (19:42 +0200)
commit745d9f4a31defec731119ee8aad8ba9f2536dd9a
treefef83adcbdf96c28dadf86ee8dfe9eee6c8a1240
parent22a40d14b572deb80c0648557f4bd502d7e83826
ubi: eba: properly rollback inside self_check_eba

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: 00abf3041590 ("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>
drivers/mtd/ubi/eba.c