summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorMikhail Arkhipov <m.arhipov@rosa.ru>2025-04-09 00:39:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-06-19 15:40:18 +0200
commit49482f4a39620f6afedcd3f6aa9e0d558b6a460b (patch)
tree8958b305fe2702f1a3b31a88ae6e8fa8db82c4c4 /tools/perf/scripts/python/task-analyzer.py
parent4bfb6060e29376966c0006fdf7b4aaf9ec23d4ac (diff)
mtd: nand: ecc-mxic: Fix use of uninitialized variable ret
[ Upstream commit d95846350aac72303036a70c4cdc69ae314aa26d ] If ctx->steps is zero, the loop processing ECC steps is skipped, and the variable ret remains uninitialized. It is later checked and returned, which leads to undefined behavior and may cause unpredictable results in user space or kernel crashes. This scenario can be triggered in edge cases such as misconfigured geometry, ECC engine misuse, or if ctx->steps is not validated after initialization. Initialize ret to zero before the loop to ensure correct and safe behavior regardless of the ctx->steps value. Found by Linux Verification Center (linuxtesting.org) with SVACE. Fixes: 48e6633a9fa2 ("mtd: nand: mxic-ecc: Add Macronix external ECC engine support") Signed-off-by: Mikhail Arkhipov <m.arhipov@rosa.ru> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions