]> git.baikalelectronics.ru Git - kernel.git/commit
interconnect: qcom: rpm: fix registration race
authorJohan Hovold <johan+linaro@kernel.org>
Mon, 6 Mar 2023 07:56:36 +0000 (08:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Mar 2023 12:33:57 +0000 (13:33 +0100)
commit53437aa246d74d82a4897910e93d24050e9b3698
tree1ce906d460b59c9794b2af8e19102f250cb98a9e
parenta1292196b69c3f1ce2d05e7ff2d532219134fd1a
interconnect: qcom: rpm: fix registration race

commit 2163b134f5953f88cf75d179d88b3a33cf6ba233 upstream.

The current interconnect provider registration interface is inherently
racy as nodes are not added until the after adding the provider. This
can specifically cause racing DT lookups to fail.

Switch to using the new API where the provider is not registered until
after it has been fully initialised.

Fixes: 7834eb78d031 ("interconnect: qcom: Consolidate interconnect RPM support")
Fixes: d3a5d586798c ("interconnect: qcom: Add MSM8916 interconnect provider driver")
Cc: stable@vger.kernel.org # 5.7
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Jun Nie <jun.nie@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20230306075651.2449-9-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/interconnect/qcom/icc-rpm.c