torvalds-linux/drivers/interconnect/qcom
Georgi Djakov 00a973e093 interconnect: qcom: icc-rpm: Set the count member before accessing the flex array
The following UBSAN error is reported during boot on the db410c board on
a clang-19 build:

Internal error: UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP
...
pc : qnoc_probe+0x5f8/0x5fc
...

The cause of the error is that the counter member was not set before
accessing the annotated flexible array member, but after that. Fix this
by initializing it earlier.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/r/CA+G9fYs+2mBz1y2dAzxkj9-oiBJ2Acm1Sf1h2YQ3VmBqj_VX2g@mail.gmail.com
Fixes: dd4904f3b9 ("interconnect: qcom: Annotate struct icc_onecell_data with __counted_by")
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20241203223334.233404-1-djakov@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-12-17 14:03:02 +02:00
..
bcm-voter.c
bcm-voter.h
icc-common.c
icc-common.h
icc-rpm-clocks.c
icc-rpm.c interconnect: qcom: icc-rpm: Set the count member before accessing the flex array 2024-12-17 14:03:02 +02:00
icc-rpm.h
icc-rpmh.c interconnect: qcom: icc-rpmh: rename qos_clks_required flag 2024-10-22 11:11:25 +03:00
icc-rpmh.h interconnect: qcom: icc-rpmh: rename qos_clks_required flag 2024-10-22 11:11:25 +03:00
Kconfig Merge branch 'icc-sar2130p' into icc-next 2024-11-05 01:32:05 +02:00
Makefile Merge branch 'icc-sar2130p' into icc-next 2024-11-05 01:32:05 +02:00
msm8909.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8916.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8937.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8939.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8953.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8974.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8976.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8996.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
msm8996.h
osm-l3.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
qcm2290.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
qcs404.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
qcs615.c interconnect: qcom: add QCS615 interconnect provider driver 2024-10-22 11:30:14 +03:00
qcs615.h interconnect: qcom: add QCS615 interconnect provider driver 2024-10-22 11:30:14 +03:00
qcs8300.c interconnect: qcom: add QCS8300 interconnect provider driver 2024-10-22 12:36:29 +03:00
qcs8300.h interconnect: qcom: add QCS8300 interconnect provider driver 2024-10-22 12:36:29 +03:00
qdu1000.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
qdu1000.h
sa8775p.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sar2130p.c interconnect: qcom: add support for SAR2130P 2024-10-22 12:27:38 +03:00
sc7180.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sc7180.h
sc7280.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sc7280.h
sc8180x.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sc8180x.h
sc8280xp.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sc8280xp.h
sdm660.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sdm670.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sdm670.h
sdm845.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sdm845.h
sdx55.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sdx55.h
sdx65.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sdx65.h
sdx75.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sdx75.h
sm6115.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm6350.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm6350.h
sm7150.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm7150.h
sm8150.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm8150.h
sm8250.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm8250.h
sm8350.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm8350.h
sm8450.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm8450.h
sm8550.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm8550.h
sm8650.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
sm8650.h
smd-rpm.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
x1e80100.c interconnect: Switch back to struct platform_driver::remove() 2024-10-22 12:34:18 +03:00
x1e80100.h