]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ubi: fastmap: Return error code if memory allocation fails in add_aeb()
authorZhihao Cheng <chengzhihao1@huawei.com>
Mon, 27 Dec 2021 03:22:42 +0000 (11:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Apr 2022 12:14:59 +0000 (14:14 +0200)
commita574f27b332a2a4e53ac89c74c3d4c11b133f2ba
treed45243794010c0dd066f5b0b4fa4cadbf9023b02
parentc7ec0bf5fdc1ddda68a2fc861f1c4681ef7049eb
ubi: fastmap: Return error code if memory allocation fails in add_aeb()

commit c3c07fc25f37c157fde041b3a0c3dfcb1590cbce upstream.

Abort fastmap scanning and return error code if memory allocation fails
in add_aeb(). Otherwise ubi will get wrong peb statistics information
after scanning.

Fixes: dbb7d2a88d2a7b ("UBI: Add fastmap core")
Signed-off-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/ubi/fastmap.c