diff options
| author | Neil Armstrong <neil.armstrong@linaro.org> | 2024-12-03 09:12:59 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-02-08 09:56:58 +0100 |
| commit | 7d68c20638e50d5eb4576492a7958328ae445248 (patch) | |
| tree | f4f9e4be2828d8a5633fed03b62f0c4715da0d89 /scripts/git.orderFile | |
| parent | 833b813b7fdab90220a0938953586ed3a87d7076 (diff) | |
| download | linux-7d68c20638e50d5eb4576492a7958328ae445248.tar.gz linux-7d68c20638e50d5eb4576492a7958328ae445248.tar.bz2 linux-7d68c20638e50d5eb4576492a7958328ae445248.zip | |
OPP: add index check to assert to avoid buffer overflow in _read_freq()
[ Upstream commit d659bc68ed489022ea33342cfbda2911a81e7a0d ]
Pass the freq index to the assert function to make sure
we do not read a freq out of the opp->rates[] table when called
from the indexed variants:
dev_pm_opp_find_freq_exact_indexed() or
dev_pm_opp_find_freq_ceil/floor_indexed().
Add a secondary parameter to the assert function, unused
for assert_single_clk() then add assert_clk_index() which
will check for the clock index when called from the _indexed()
find functions.
Fixes: 142e17c1c2b4 ("OPP: Introduce dev_pm_opp_find_freq_{ceil/floor}_indexed() APIs")
Fixes: a5893928bb17 ("OPP: Add dev_pm_opp_find_freq_exact_indexed()")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'scripts/git.orderFile')
0 files changed, 0 insertions, 0 deletions
