bianbu-linux-6.6/arch/arm/mach-ep93xx
Dan Carpenter 66e78ade97 ep93xx: clock: Fix off by one in ep93xx_div_recalc_rate()
[ Upstream commit c7f06284a6427475e3df742215535ec3f6cd9662 ]

The psc->div[] array has psc->num_div elements.  These values come from
when we call clk_hw_register_div().  It's adc_divisors and
ARRAY_SIZE(adc_divisors)) and so on.  So this condition needs to be >=
instead of > to prevent an out of bounds read.

Fixes: 9645ccc7bd ("ep93xx: clock: convert in-place to COMMON_CLK")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Reviewed-by: Nikita Shubin <nikita.shubin@maquefel.me>
Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://lore.kernel.org/r/1caf01ad4c0a8069535813c26c7f0b8ea011155e.camel@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-10-04 16:29:40 +02:00
..
clock.c ep93xx: clock: Fix off by one in ep93xx_div_recalc_rate() 2024-10-04 16:29:40 +02:00
core.c ARM: ep93xx: Add terminator to gpiod_lookup_table 2024-03-01 13:35:01 +01:00
dma.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
edb93xx.c ARM: ep93xx: enable SPARSE_IRQ 2022-04-04 10:22:37 +02:00
ep93xx-regs.h ARM: ep93xx: make mach/ep93xx-regs.h local 2022-04-04 10:22:37 +02:00
gpio-ep93xx.h ARM: ep93xx: make mach/ep93xx-regs.h local 2022-04-04 10:22:37 +02:00
hardware.h ARM: ep93xx: move private headers out of mach/* 2019-04-28 23:08:44 -07:00
irqs.h ARM: ep93xx: enable SPARSE_IRQ 2022-04-04 10:22:37 +02:00
Kconfig ARM: ep93xx: remove old board files 2023-01-10 23:10:27 +01:00
Makefile ARM: ep93xx: remove old board files 2023-01-10 23:10:27 +01:00
platform.h ARM: ep93xx: remove MaverickCrunch support 2021-08-04 13:30:04 +02:00
soc.h ARM: ep93xx: make mach/ep93xx-regs.h local 2022-04-04 10:22:37 +02:00
timer-ep93xx.c ARM: ep93xx: fix missing-prototype warnings 2023-05-26 13:31:37 +02:00
ts72xx.c ARM: ep93xx: Make ts72xx_register_flash() static 2022-05-27 16:00:58 +02:00
ts72xx.h ARM: ep93xx: ts72xx: Add support for BK3 board - ts72xx derivative 2017-12-13 22:26:10 +01:00
vision_ep9307.c ARM: ep93xx: enable SPARSE_IRQ 2022-04-04 10:22:37 +02:00