From: sashiko-bot@kernel.org
To: "Gaurav Kohli" <gaurav.kohli@oss.qualcomm.com>
Cc: robh@kernel.org, devicetree@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v8 4/9] remoteproc: qcom_q6v5_pas: enable QMI TMD cooling support
Date: Sun, 09 Aug 2026 12:46:06 +0000 [thread overview]
Message-ID: <20260809124606.B433C1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260809-b4-qmi-tmd-v8-4-b15d47adc379@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] The dtb firmware requested in `qcom_pas_load()` is leaked on the success path.
--
--- Patch [4]: [PATCH v8 4/9] remoteproc: qcom_q6v5_pas: enable QMI TMD cooling support ---
commit 58dbaa804b582ef4740c9e6df30c9004a8e9ffae
Author: Gaurav Kohli <gaurav.kohli@oss.qualcomm.com>
remoteproc: qcom_q6v5_pas: enable QMI TMD cooling support
This commit enables Thermal Mitigation Device (TMD) support for PAS-managed
CDSP and modem remote processors on platforms exposing the QMI TMD service.
It adds per-platform TMD configurations and uses endpoint names for cooling
device registration. This allows the subsystems to act as cooling devices
in the thermal framework.
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index 24a766718b107..732fe2961a965 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
[ ... ]
> @@ -1366,6 +1387,9 @@ static const struct qcom_pas_data x1e80100_cdsp_resource = {
> .ssr_name = "cdsp",
> .sysmon_name = "cdsp",
> .ssctl_id = 0x17,
> + .tmd_instance_id = 0x43,
> + .tmd_name = cdsp_tmd_name,
> + .num_tmd = ARRAY_SIZE(cdsp_tmd_name),
> };
[Severity: High]
This isn't a bug introduced by this patch, but while reviewing it I
noticed a pre-existing memory leak in qcom_pas_load() that affects
devices like the x1e80100_cdsp_resource modified here.
When dtb_pas_id is set, qcom_pas_load() allocates dtb_firmware but
fails to release it on the success path:
drivers/remoteproc/qcom_q6v5_pas.c:qcom_pas_load() {
...
if (pas->dtb_pas_id) {
ret = request_firmware(&pas->dtb_firmware, pas->dtb_firmware_name, pas->dev);
...
ret = qcom_mdt_pas_load(pas->dtb_pas_ctx, pas->dtb_firmware,
pas->dtb_firmware_name, &pas->dtb_mem_reloc);
if (ret) {
qcom_pas_metadata_release(pas->dtb_pas_ctx);
release_firmware(pas->dtb_firmware);
return ret;
}
}
return 0;
}
Can this leak the pas->dtb_firmware buffer on successful loads since
release_firmware() is only called in the error path?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260809-b4-qmi-tmd-v8-0-b15d47adc379@oss.qualcomm.com?part=4
next prev parent reply other threads:[~2026-08-09 12:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-09 12:28 [PATCH v8 0/9] Add support for Qualcomm remoteproc subsystem cooling Gaurav Kohli
2026-08-09 12:28 ` [PATCH v8 1/9] dt-bindings: remoteproc: qcom,pas: add #cooling-cells property Gaurav Kohli
2026-08-09 12:28 ` [PATCH v8 2/9] soc: qcom: Add QMI TMD support for remote thermal mitigation Gaurav Kohli
2026-08-09 12:47 ` sashiko-bot
2026-08-10 10:05 ` Gaurav Kohli
2026-08-09 12:28 ` [PATCH v8 3/9] remoteproc: qcom: pas: add support for TMD thermal cooling devices Gaurav Kohli
2026-08-09 12:45 ` sashiko-bot
2026-08-09 12:29 ` [PATCH v8 4/9] remoteproc: qcom_q6v5_pas: enable QMI TMD cooling support Gaurav Kohli
2026-08-09 12:46 ` sashiko-bot [this message]
2026-08-09 12:29 ` [PATCH v8 5/9] arm64: dts: qcom: kodiak: Enable CDSP & Modem cooling Gaurav Kohli
2026-08-09 12:29 ` [PATCH v8 6/9] arm64: dts: qcom: lemans: Enable CDSP cooling Gaurav Kohli
2026-08-09 12:29 ` [PATCH v8 7/9] arm64: dts: qcom: talos: " Gaurav Kohli
2026-08-09 12:29 ` [PATCH v8 8/9] arm64: dts: qcom: monaco: " Gaurav Kohli
2026-08-09 12:29 ` [PATCH v8 9/9] arm64: dts: qcom: hamoa: " Gaurav Kohli
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=20260809124606.B433C1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=gaurav.kohli@oss.qualcomm.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.