From: sashiko-bot@kernel.org
To: "Faiyaz Mohammed" <faiyaz.mohammed@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 4/4] arm64: dts: qcom: shikra: add LCP/SRP ECC interrupt to LLCC node
Date: Wed, 14 Oct 2026 16:08:07 +0000 [thread overview]
Message-ID: <sashiko-outbox-171515@kernel.org> (raw)
In-Reply-To: <20261014-master-v1-4-aba3cfcfbac9@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] edac: qcom: UAF in IRQ handlers due to asymmetrical devm vs manual teardown
--
commit fab541f0482e82717fee45392a6aa89253bbeef9
Author: Faiyaz Mohammed <faiyaz.mohammed@oss.qualcomm.com>
arm64: dts: qcom: shikra: add LCP/SRP ECC interrupt to LLCC node
Add a second interrupt for LCP/SRP DDR DRAM ECC reporting and
interrupt-names ("llcc-ecc", "llcc-lcp-ecc") to the Shikra LLCC node,
as required by the updated DT binding.
> diff --git a/arch/arm64/boot/dts/qcom/shikra.dtsi b/arch/arm64/boot/dts/qcom/shikra.dtsi
> index 2623e139196f6..ff572c003b396 100644
> --- a/arch/arm64/boot/dts/qcom/shikra.dtsi
> +++ b/arch/arm64/boot/dts/qcom/shikra.dtsi
> @@ -1108,7 +1108,9 @@ llcc: system-cache-controller@e00000 {
> reg-names = "llcc0_base",
> "llcc1_base",
> "llcc_broadcast_base";
> - interrupts = <GIC_SPI 539 IRQ_TYPE_LEVEL_HIGH 0>;
> + interrupts = <GIC_SPI 539 IRQ_TYPE_LEVEL_HIGH 0>,
> + <GIC_SPI 538 IRQ_TYPE_LEVEL_HIGH 0>;
> + interrupt-names = "llcc-ecc", "llcc-lcp-ecc";
[Severity: High]
Does adding this new interrupt expose a use-after-free race condition in the
EDAC driver?
In drivers/edac/qcom_edac.c, devm-managed IRQs remain active until the devres
phase, but edac_device_free_ctl_info() manually frees the payload object:
drivers/edac/qcom_edac.c:qcom_llcc_edac_remove() {
...
edac_device_free_ctl_info(edev_ctl);
...
}
If the newly enabled lcp_irq or the ecc_irq fires during module removal
(after qcom_llcc_edac_remove() frees edev_ctl but before devres deregisters
the IRQs), can the interrupt handler dereference the freed edev_ctl?
drivers/edac/qcom_edac.c:llcc_lcp_ecc_irq_handler() {
...
struct llcc_drv_data *drv = edac_dev_ctl->dev->platform_data;
...
}
This could lead to invalid memory accesses, unpredictable behavior,
or a kernel panic.
The same race seems to exist on the probe error path if
edac_device_add_device() fails, leaving the IRQ active until the function
returns:
drivers/edac/qcom_edac.c:qcom_llcc_edac_probe() {
...
rc = edac_device_add_device(edev_ctl);
if (rc) {
edac_device_free_ctl_info(edev_ctl);
return rc;
}
...
}
> };
>
> gcc: clock-controller@1400000 {
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261014-master-v1-0-aba3cfcfbac9@oss.qualcomm.com?part=4
prev parent reply other threads:[~2026-10-14 16:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 15:56 [PATCH 0/4] edac: qcom: add DDR DRAM ECC reporting for Shikra (QCM2390) Faiyaz Mohammed
2026-10-14 15:56 ` [PATCH 1/4] dt-bindings: cache: qcom,llcc: allow optional second interrupt for LCP/SRP ECC Faiyaz Mohammed
2026-10-14 16:05 ` sashiko-bot
2026-10-14 15:56 ` [PATCH 2/4] soc: qcom: llcc: add LCP/SRP DDR DRAM ECC register offsets Faiyaz Mohammed
2026-10-14 15:56 ` [PATCH 3/4] edac: qcom: add LCP/SRP DDR DRAM ECC support for Shikra Faiyaz Mohammed
2026-10-14 16:09 ` sashiko-bot
2026-10-14 15:56 ` [PATCH 4/4] arm64: dts: qcom: shikra: add LCP/SRP ECC interrupt to LLCC node Faiyaz Mohammed
2026-10-14 16:08 ` sashiko-bot [this message]
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=sashiko-outbox-171515@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=faiyaz.mohammed@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.