linux-loongson/drivers/mtd/nand/onenand
Ivan Stepchenko 70a71f8151 mtd: onenand: Fix uninitialized retlen in do_otp_read()
The function do_otp_read() does not set the output parameter *retlen,
which is expected to contain the number of bytes actually read.
As a result, in onenand_otp_walk(), the tmp_retlen variable remains
uninitialized after calling do_otp_walk() and used to change
the values of the buf, len and retlen variables.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 49dc08eeda ("[MTD] [OneNAND] fix numerous races")
Cc: stable@vger.kernel.org
Signed-off-by: Ivan Stepchenko <sid@itb.spb.ru>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
2024-12-05 11:11:00 +01:00
..
generic.c mtd: Switch back to struct platform_driver::remove() 2024-10-21 11:58:07 +02:00
Kconfig mtd: onenand: omap2: Drop obsolete dependency on COMPILE_TEST 2023-04-11 15:42:23 +02:00
Makefile mtd: onenand: Rename omap2 driver to avoid a build warning 2020-01-21 20:00:35 +01:00
onenand_base.c mtd: onenand: Fix uninitialized retlen in do_otp_read() 2024-12-05 11:11:00 +01:00
onenand_bbt.c mtd: always initialize 'stats' in struct mtd_oob_ops 2022-09-21 10:38:07 +02:00
onenand_omap2.c mtd: Switch back to struct platform_driver::remove() 2024-10-21 11:58:07 +02:00
onenand_samsung.c mtd: Switch back to struct platform_driver::remove() 2024-10-21 11:58:07 +02:00
samsung.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00