From: sashiko-bot@kernel.org
To: "Agustin Santiago Isasmendi" <isasmendi.agus@gmail.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 2/2] ARM: l2c: honour status = "disabled" on the L2 cache node
Date: Thu, 12 Nov 2026 07:37:25 +0000 [thread overview]
Message-ID: <sashiko-outbox-210618@kernel.org> (raw)
In-Reply-To: <20261112072953.989664-3-isasmendi.agus@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] ARM: l2c: device_node refcount leak on disabled DT node in
l2x0_of_init()
--
commit 98b76cb0386da8baf1e847208a1b97f4eab12a69
Author: Agustin Santiago Isasmendi <isasmendi.agus@gmail.com>
ARM: l2c: honour status = "disabled" on the L2 cache node
This commit checks of_device_is_available() in l2x0_of_init() so that an
L2 cache controller node marked disabled in the device tree is skipped.
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index 470867160076f..5d6a4c040a506 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -1772,6 +1772,11 @@ int __init l2x0_of_init(u32 aux_val, u32 aux_mask)
> if (!np)
> return -ENODEV;
>
> + if (!of_device_is_available(np)) {
> + pr_info("L2C: disabled by the device tree\n");
> + return -ENODEV;
> + }
[Severity: Medium]
Does this leak a reference to np? of_find_matching_node() returns np with
its refcount incremented, and unlike the drivers/cache/ drivers mentioned
in the commit message (which declare np with __free(device_node)),
l2x0_of_init() uses a plain struct device_node *np and returns here
without calling of_node_put(np).
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261112072953.989664-1-isasmendi.agus@gmail.com?part=2
next prev parent reply other threads:[~2026-11-12 7:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 7:29 [PATCH v2 0/2] ARM: l2c: honour status = "disabled" on the L2 cache node Agustin Santiago Isasmendi
2026-11-12 7:29 ` [PATCH v2 1/2] dt-bindings: cache: l2c2x0: a disabled node is left to the firmware Agustin Santiago Isasmendi
2026-11-12 7:29 ` [PATCH v2 2/2] ARM: l2c: honour status = "disabled" on the L2 cache node Agustin Santiago Isasmendi
2026-11-12 7:37 ` sashiko-bot [this message]
2026-11-13 0:36 ` [PATCH v2 0/2] " Navid Ghahremani
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-210618@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=isasmendi.agus@gmail.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.