Commit 57f20d51 authored by Dmitry Baryshkov's avatar Dmitry Baryshkov Committed by Bjorn Andersson

soc: qcom: pdr: fix parsing of domains lists

While parsing the domains list, start offsets from 0 rather than from
domains_read. The domains_read is equal to the total count of the
domains we have seen, while the domains list in the message starts from
offset 0.

Fixes: fbe639b4 ("soc: qcom: Introduce Protection Domain Restart helpers")
Tested-by: default avatarSteev Klimaszewski <steev@kali.org>
Tested-by: default avatarAlexey Minnekhanov <alexeymin@postmarketos.org>
Reviewed-by: default avatarChris Lew <quic_clew@quicinc.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Signed-off-by: default avatarDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240622-qcom-pd-mapper-v9-2-a84ee3591c8e@linaro.orgSigned-off-by: default avatarBjorn Andersson <andersson@kernel.org>
parent 107924c1
...@@ -417,7 +417,7 @@ static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds) ...@@ -417,7 +417,7 @@ static int pdr_locate_service(struct pdr_handle *pdr, struct pdr_service *pds)
if (ret < 0) if (ret < 0)
goto out; goto out;
for (i = domains_read; i < resp->domain_list_len; i++) { for (i = 0; i < resp->domain_list_len; i++) {
entry = &resp->domain_list[i]; entry = &resp->domain_list[i];
if (strnlen(entry->name, sizeof(entry->name)) == sizeof(entry->name)) if (strnlen(entry->name, sizeof(entry->name)) == sizeof(entry->name))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment