WSL2-Linux-Kernel/drivers/interconnect
Dmitry Baryshkov d2430d45f1 interconnect: qcom: osm-l3: fix icc_onecell_data allocation
[ Upstream commit f77ebdda0e ]

This is a struct with a trailing zero-length array of icc_node pointers
but it's allocated as if it were a single array of icc_nodes instead.

Fortunately this overallocates memory rather then allocating less memory
than required.

Fix by replacing devm_kcalloc() with devm_kzalloc() and struct_size()
macro.

Fixes: 5bc9900add ("interconnect: qcom: Add OSM L3 interconnect provider support")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230105002221.1416479-2-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-30 12:47:41 +02:00
..
imx interconnect: imx: fix max_node_id 2022-08-17 14:23:53 +02:00
qcom interconnect: qcom: osm-l3: fix icc_onecell_data allocation 2023-03-30 12:47:41 +02:00
samsung interconnect: exynos: fix node leak in probe PM QoS error path 2023-03-22 13:31:32 +01:00
Kconfig interconnect: Add generic interconnect driver for Exynos SoCs 2020-11-30 17:26:22 +02:00
Makefile interconnect: Add generic interconnect driver for Exynos SoCs 2020-11-30 17:26:22 +02:00
bulk.c interconnect: Fix kerneldoc warning 2021-03-18 23:46:21 +02:00
core.c interconnect: fix mem leak when freeing nodes 2023-03-22 13:31:32 +01:00
internal.h interconnect: Add helpers for enabling/disabling a path 2020-05-10 18:30:37 +03:00
trace.h interconnect: Add basic tracepoints 2019-12-16 09:25:23 +02:00