[PATCH linux-next 14/33] clk: mediatek: Fix MT8173 onecell IDs after common probe migration
Ryan Brue
ryanbrue.dev at gmail.com
Wed Dec 2 13:56:21 PST 2026
On Sun, Nov 29, 2026 at 10:47:26AM +0900, Akari Tsuyukusa wrote:
> Migrating the MT8173 infracfg clock driver to the common probe/remove
> helpers stopped using CLK_*_NR for onecell data allocation, causing
> a out-of-bounds registration due to an missing dummy slot for ID 0.
Tested on MT8173 (Amazon Fire HD 10 2017): v7.4-rc5 with board patches
and the mtk-clk-for-v7.5 tag merged in, KASAN on, two boots each way.
Without this patch, KASAN reports an 8-byte out-of-bounds read and write
in mtk_clk_register_cpumuxes() at boot, just past the 120-byte clk_data.
The A72 clock can't be looked up ("of_clk_hw_onecell_get: invalid index
14"), so mtk-cpufreq fails to probe and there is no cpufreq on any CPU.
The A72 cores stay at 851.5 MHz.
With the patch there are no KASAN reports, both cpufreq policies come
up, and the A72 cluster goes up to 1.807 GHz under load, the same as on
7.4-rc5 without the tag.
8c9dacbf42f1 is in the mtk-clk-for-v7.5 pull, so without this fix MT8173
boards will lose cpufreq in 7.5.
Tested-by: Ryan Brue <ryanbrue.dev at gmail.com> # MT8173, amazon-suez
More information about the linux-arm-kernel
mailing list