From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
To: "Felix Gu" <ustc.gu@gmail.com>,
"Claudiu Beznea" <claudiu.beznea.uj@bp.renesas.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: rzg3s-host: Fix device node reference leak in rzg3s_pcie_host_parse_port()
Date: Wed, 4 Feb 2026 14:33:17 +0200 [thread overview]
Message-ID: <c1f4ad90-bcdf-4dc3-9eae-2a74df86bd3d@tuxon.dev> (raw)
In-Reply-To: <20260204-rzg3s-v1-1-142bc81c3312@gmail.com>
On 2/3/26 18:46, Felix Gu wrote:
> In rzg3s_pcie_host_parse_port(), of_get_next_child() returns a device
> node with an incremented reference count that must be released with
> of_node_put(). The current code fails to call of_node_put() which
> causes a reference leak.
>
> Use the __free(device_node) attribute to ensure automatic cleanup when
> the variable goes out of scope.
>
> Fixes: 7ef502fb35b2 ("PCI: Add Renesas RZ/G3S host controller driver")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tested-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
next prev parent reply other threads:[~2026-02-04 12:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-03 16:46 [PATCH] PCI: rzg3s-host: Fix device node reference leak in rzg3s_pcie_host_parse_port() Felix Gu
2026-02-04 12:33 ` Claudiu Beznea [this message]
2026-02-05 8:05 ` Manivannan Sadhasivam
2026-02-06 22:06 ` Bjorn Helgaas
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=c1f4ad90-bcdf-4dc3-9eae-2a74df86bd3d@tuxon.dev \
--to=claudiu.beznea@tuxon.dev \
--cc=bhelgaas@google.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--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=robh@kernel.org \
--cc=ustc.gu@gmail.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