soc: qcom: pdr: protect locator_addr with the main mutex
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 21 Jun 2024 22:03:40 +0000 (01:03 +0300)
committerBjorn Andersson <andersson@kernel.org>
Mon, 24 Jun 2024 03:41:39 +0000 (22:41 -0500)
commit107924c14e3ddd85119ca43c26a4ee1056fa9b84
tree6036c83369aa317ff8eb46549d22b7bdc4ecbc42
parent1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
soc: qcom: pdr: protect locator_addr with the main mutex

If the service locator server is restarted fast enough, the PDR can
rewrite locator_addr fields concurrently. Protect them by placing
modification of those fields under the main pdr->lock.

Fixes: fbe639b44a82 ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Steev Klimaszewski <steev@kali.org>
Tested-by: Alexey Minnekhanov <alexeymin@postmarketos.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-1-a84ee3591c8e@linaro.org
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/soc/qcom/pdr_interface.c