From: Bjorn Helgaas <helgaas@kernel.org>
To: Yuho Choi <oss.patchbox@gmail.com>
Cc: "Marek Vasut" <marek.vasut+renesas@mailbox.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] PCI: rcar: Release temporary device tree node reference
Date: Wed, 4 Nov 2026 11:55:00 -0600 [thread overview]
Message-ID: <20261104175500.GA1357062@bhelgaas> (raw)
In-Reply-To: <20260924010418.726980-1-oss.patchbox@gmail.com>
On Wed, Sep 23, 2026 at 09:04:11PM -0400, Yuho Choi wrote:
> of_find_matching_node() returns a referenced node even when it is used
> only as a boolean test. Drop the reference right after the match check.
I guess this actually fixes an of_node reference leak, right?
> Fixes: a115b1bd3af0 ("PCI: rcar: Add L1 link state fix into data abort hook")
> Signed-off-by: Yuho Choi <oss.patchbox@gmail.com>
> ---
> Changes in v2:
> - Use an explicit of_node_put() instead of __free(device_node) (Marek Vasut)
> - Switch to my oss.patchbox address
>
> v1: https://lore.kernel.org/all/20260801233841.469826-1-dbgh9129@gmail.com/
>
> drivers/pci/controller/pcie-rcar-host.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
> index cd9171eebc289..1f5e33c802b5b 100644
> --- a/drivers/pci/controller/pcie-rcar-host.c
> +++ b/drivers/pci/controller/pcie-rcar-host.c
> @@ -1122,7 +1122,11 @@ static const struct of_device_id rcar_pcie_abort_handler_of_match[] __initconst
>
> static int __init rcar_pcie_init(void)
> {
> - if (of_find_matching_node(NULL, rcar_pcie_abort_handler_of_match)) {
> + struct device_node *np;
> +
> + np = of_find_matching_node(NULL, rcar_pcie_abort_handler_of_match);
> + if (np) {
> + of_node_put(np);
> #ifdef CONFIG_ARM_LPAE
> hook_fault_code(17, rcar_pcie_aarch32_abort_handler, SIGBUS, 0,
> "asynchronous external abort");
>
> base-commit: f0100363d8c374bd8e9ea7c9ba02744f0b802ca4
> --
> 2.43.0
>
prev parent reply other threads:[~2026-11-04 17:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 1:04 Yuho Choi
2026-09-24 6:51 ` Geert Uytterhoeven
2026-09-25 4:31 ` Marek Vasut
2026-10-27 11:50 ` Manivannan Sadhasivam
2026-11-04 17:55 ` Bjorn Helgaas [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=20261104175500.GA1357062@bhelgaas \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@mailbox.org \
--cc=oss.patchbox@gmail.com \
--cc=robh@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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®