diff options
| author | Aleksandr Mishin <amishin@t-argos.ru> | 2024-08-27 13:12:39 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-05 14:01:13 +0100 |
| commit | a11046ea796275390dc050d5738f5c568424efdc (patch) | |
| tree | 730fe465a1e2fb1bef97c55e6304ee72323f840e /drivers/block | |
| parent | 602c0e55319cfc0e8a4339df302d627ad936f3d5 (diff) | |
| download | linux-a11046ea796275390dc050d5738f5c568424efdc.tar.gz linux-a11046ea796275390dc050d5738f5c568424efdc.tar.bz2 linux-a11046ea796275390dc050d5738f5c568424efdc.zip | |
acpi/arm64: Adjust error handling procedure in gtdt_parse_timer_block()
[ Upstream commit 1a9de2f6fda69d5f105dd8af776856a66abdaa64 ]
In case of error in gtdt_parse_timer_block() invalid 'gtdt_frame'
will be used in 'do {} while (i-- >= 0 && gtdt_frame--);' statement block
because do{} block will be executed even if 'i == 0'.
Adjust error handling procedure by replacing 'i-- >= 0' with 'i-- > 0'.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: a712c3ed9b8a ("acpi/arm64: Add memory-mapped timer support in GTDT driver")
Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>
Acked-by: Hanjun Guo <guohanjun@huawei.com>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Aleksandr Mishin <amishin@t-argos.ru>
Link: https://lore.kernel.org/r/20240827101239.22020-1-amishin@t-argos.ru
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/block')
0 files changed, 0 insertions, 0 deletions
