diff options
| author | Cristian Ciocaltea <cristian.ciocaltea@collabora.com> | 2026-08-11 18:44:44 +0300 |
|---|---|---|
| committer | Vinod Koul <vkoul@kernel.org> | 2026-08-11 22:24:02 +0530 |
| commit | 229788526ff24e0607726e93b74dd2ef157a99cd (patch) | |
| tree | 090813301db68d0c079c16513deedce0a5d4dd61 /include/linux | |
| parent | c4fe5a9f379055ce0ec930f6495ae62aad237b89 (diff) | |
phy: rockchip: samsung-hdptx: Guard against clk rate integer underflow
The 'fout' subtraction in rk_hdptx_phy_clk_calc_rate_from_pll_cfg()
could result in an integer underflow, if the hardware registers are
misconfigured or contain uninitialized values, such that the computed
sigma-delta modulator offset sdm exceeds the base frequency fout.
This might lead to an absurdly high clock rate being returned to the
Common Clock Framework, with unpredictable effects on downstream clk
consumers.
Provide the necessary sanitization to avoid trusting the hardware state.
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/all/20260611235702.0E9691F000E9@smtp.kernel.org/
Fixes: 3481fc04d969 ("phy: rockchip: samsung-hdptx: Compute clk rate from PLL config")
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Link: https://patch.msgid.link/20260811-hdptx-clk-fixes-v6-3-75bca0ee5753@collabora.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
