From: Guangshuo Li <lgs201920130244@gmail.com>
To: Bjorn Andersson <andersson@kernel.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>,
Sivaprakash Murugesan <sivaprak@codeaurora.org>,
Gokul Sriram Palanisamy <quic_gokulsri@quicinc.com>,
Govind Singh <govinds@codeaurora.org>,
linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Guangshuo Li <lgs201920130244@gmail.com>, stable@vger.kernel.org
Subject: [PATCH] remoteproc: qcom: q6v5-wcss: remove all subdevices on unbind
Date: Fri, 18 Sep 2026 12:13:21 +0800 [thread overview]
Message-ID: <20260918041321.3532355-1-lgs201920130244@gmail.com> (raw)
q6v5_wcss_probe() registers GLINK, PDM and SSR remoteproc subdevices,
and may also register a sysmon subdevice. The probe failure path
removes all of these subdevices, but q6v5_wcss_remove() only removes
the PDM subdevice.
As a result, GLINK, SSR and sysmon resources and registrations can
remain after the WCSS driver is removed.
Call rproc_del() before tearing down the Qualcomm-specific resources,
matching the teardown order used by the other Qualcomm Q6 remoteproc
drivers, and remove the GLINK, sysmon and SSR subdevices together with
the existing PDM cleanup.
This issue was found by manual code inspection.
Fixes: 8a226e2c71bb ("remoteproc: wcss: add support for rpmsg communication")
Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
---
drivers/remoteproc/qcom_q6v5_wcss.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index b391724cfd08..4d3a1adbf6c1 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -1042,9 +1042,13 @@ static void q6v5_wcss_remove(struct platform_device *pdev)
struct rproc *rproc = platform_get_drvdata(pdev);
struct q6v5_wcss *wcss = rproc->priv;
+ rproc_del(rproc);
+
qcom_q6v5_deinit(&wcss->q6v5);
+ qcom_remove_glink_subdev(rproc, &wcss->glink_subdev);
qcom_remove_pdm_subdev(rproc, &wcss->pdm_subdev);
- rproc_del(rproc);
+ qcom_remove_sysmon_subdev(wcss->sysmon);
++ qcom_remove_ssr_subdev(rproc, &wcss->ssr_subdev);
}
static const struct wcss_data wcss_ipq8074_res_init = {
--
2.43.0
next reply other threads:[~2026-09-18 4:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-18 4:13 Guangshuo Li [this message]
2026-09-19 7:34 ` kernel test robot
2026-09-19 13:13 ` kernel test robot
2026-09-21 15:14 ` krzk
2026-09-22 2:52 ` Guangshuo Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260918041321.3532355-1-lgs201920130244@gmail.com \
--to=lgs201920130244@gmail.com \
--cc=andersson@kernel.org \
--cc=govinds@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=quic_gokulsri@quicinc.com \
--cc=sivaprak@codeaurora.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®