WSL2-Linux-Kernel/drivers/interconnect
Mike Tipton 3cbae23d48 interconnect: Treat xlate() returning NULL node as an error
[ Upstream commit ad2ab1297d0c80899125a842bb7a078abfe1e6ce ]

Currently, if provider->xlate() or provider->xlate_extended()
"successfully" return a NULL node, then of_icc_get_from_provider() won't
consider that an error and will successfully return the NULL node. This
bypasses error handling in of_icc_get_by_index() and leads to NULL
dereferences in path_find().

This could be avoided by ensuring provider callbacks always return an
error for NULL nodes, but it's better to explicitly protect against this
in the common framework.

Fixes: 87e3031b6f ("interconnect: Allow endpoints translation via DT")
Signed-off-by: Mike Tipton <quic_mdtipton@quicinc.com>
Link: https://lore.kernel.org/r/20231025145829.11603-1-quic_mdtipton@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-05 15:13:32 +01: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
Makefile
bulk.c interconnect: Fix kerneldoc warning 2021-03-18 23:46:21 +02:00
core.c interconnect: Treat xlate() returning NULL node as an error 2024-01-05 15:13:32 +01:00
internal.h
trace.h