]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
mtd: inftlcore: Add error check for inftl_read_oob()
authorWentao Liang <vulab@iscas.ac.cn>
Wed, 2 Apr 2025 03:16:43 +0000 (11:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:44:04 +0000 (07:44 +0200)
commite7d6ceff95c55297f0ee8f9dbc4da5c558f30e9e
tree7b517b1bfb3ae180fd69a0c2bbf4fc895e6b20fa
parentcef678a27711611b23713fd063ea9b572a7e8db6
mtd: inftlcore: Add error check for inftl_read_oob()

commit d027951dc85cb2e15924c980dc22a6754d100c7c upstream.

In INFTL_findwriteunit(), the return value of inftl_read_oob()
need to be checked. A proper implementation can be
found in INFTL_deleteblock(). The status will be set as
SECTOR_IGNORE to break from the while-loop correctly
if the inftl_read_oob() fails.

Fixes: 8593fbc68b0d ("[MTD] Rework the out of band handling completely")
Cc: stable@vger.kernel.org # v2.6+
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/inftlcore.c