Message ID | 20240229-freq-table-terminator-v1-0-074334f0905c@gmail.com |
---|---|
Headers | show |
Series | clk: qcom: fix frequency table termination in several drivers | expand |
On Fri, Mar 01, 2024 at 02:37:01PM +0100, Gabor Juhos wrote: > Hi Johan, > > 2024. 03. 01. 10:40 keltezéssel, Johan Hovold írta: > > On Thu, Feb 29, 2024 at 07:07:46PM +0100, Gabor Juhos wrote: > >> The frequency table arrays are supposed to be terminated with an > >> empty element. Add such entry to the end of the arrays where it > >> is missing in order to avoid possible out-of-bound access when > >> the table is traversed by functions like qcom_find_freq() or > >> qcom_find_freq_floor(). > >> > >> Fixes: e3fdbef1bab8 ("clk: qcom: Add Global Clock controller (GCC) driver for IPQ5018") > > > > Good find! > > > > Looks like these should be backported to the stable kernels as well so > > someone should add: > > > > Cc: stable@vger.kernel.org > > > > to all patches except possibly the sc8280xp one (that camera clock > > controller was added in 6.8-rc1 so that patch does not need it in case > > you can these fixes in before 6.8 is released). > > You are right maybe, although I did not find strong enough reasons for adding > the stable tags. > > Only the changes of the gcc-ipq5018 driver has been tested on real hardware the > others are not. So those does not fit into the "It must be obviously correct and > tested." rule. Since this looks like a straight-forward and obviously correct fix for a bug which could have bad consequences, not being able to test each patch on actual hardware is not a problem. Johan
On Thu, 29 Feb 2024 19:07:45 +0100, Gabor Juhos wrote: > Add missing terminating entry to frequency table arrays in > several drivers. There are separate independent patches for > each affected driver. > > The series is based on v6.8-rc6. > > > [...] Applied, thanks! [1/7] clk: qcom: gcc-ipq5018: fix terminating of frequency table arrays commit: 90ad946fff70f312b8d23226afc38c13ddd88c4b [2/7] clk: qcom: gcc-ipq6018: fix terminating of frequency table arrays commit: cdbc6e2d8108bc47895e5a901cfcaf799b00ca8d [3/7] clk: qcom: gcc-ipq8074: fix terminating of frequency table arrays commit: 1040ef5ed95d6fd2628bad387d78a61633e09429 [4/7] clk: qcom: gcc-ipq9574: fix terminating of frequency table arrays commit: bd2b6395671d823caa38d8e4d752de2448ae61e1 [5/7] clk: qcom: camcc-sc8280xp: fix terminating of frequency table arrays commit: 6a3d70f7802a98e6c28a74f997a264118b9f50cd [6/7] clk: qcom: mmcc-apq8084: fix terminating of frequency table arrays commit: a903cfd38d8dee7e754fb89fd1bebed99e28003d [7/7] clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays commit: e2c02a85bf53ae86d79b5fccf0a75ac0b78e0c96 Best regards,
Add missing terminating entry to frequency table arrays in several drivers. There are separate independent patches for each affected driver. The series is based on v6.8-rc6. Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> --- Gabor Juhos (7): clk: qcom: gcc-ipq5018: fix terminating of frequency table arrays clk: qcom: gcc-ipq6018: fix terminating of frequency table arrays clk: qcom: gcc-ipq8074: fix terminating of frequency table arrays clk: qcom: gcc-ipq9574: fix terminating of frequency table arrays clk: qcom: camcc-sc8280xp: fix terminating of frequency table arrays clk: qcom: mmcc-apq8084: fix terminating of frequency table arrays clk: qcom: mmcc-msm8974: fix terminating of frequency table arrays drivers/clk/qcom/camcc-sc8280xp.c | 21 +++++++++++++++++++++ drivers/clk/qcom/gcc-ipq5018.c | 3 +++ drivers/clk/qcom/gcc-ipq6018.c | 2 ++ drivers/clk/qcom/gcc-ipq8074.c | 2 ++ drivers/clk/qcom/gcc-ipq9574.c | 1 + drivers/clk/qcom/mmcc-apq8084.c | 2 ++ drivers/clk/qcom/mmcc-msm8974.c | 2 ++ 7 files changed, 33 insertions(+) --- base-commit: d206a76d7d2726f3b096037f2079ce0bd3ba329b change-id: 20240223-freq-table-terminator-f78760e7b5e0 Best regards,