From: Simon Horman <horms@kernel.org>
To: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Cc: rafal@milecki.pl, bcm-kernel-feedback-list@broadcom.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org
Subject: Re: [PATCH v2] net: ethernet: bgmac-platform: fix an OF node reference leak
Date: Mon, 16 Dec 2024 14:56:37 +0000 [thread overview]
Message-ID: <20241216145637.GD780307@kernel.org> (raw)
In-Reply-To: <20241214014912.2810315-1-joe@pf.is.s.u-tokyo.ac.jp>
On Sat, Dec 14, 2024 at 10:49:12AM +0900, Joe Hattori wrote:
> The OF node obtained by of_parse_phandle() is not freed. Call
> of_node_put() to balance the refcount.
>
> This bug was found by an experimental static analysis tool that I am
> developing.
>
> Fixes: 1676aba5ef7e ("net: ethernet: bgmac: device tree phy enablement")
> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
> ---
> Changes in V2:
> - Avoid using the __free() construct.
Thanks for the update.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-12-16 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-14 1:49 [PATCH v2] net: ethernet: bgmac-platform: fix an OF node reference leak Joe Hattori
2024-12-16 14:56 ` Simon Horman [this message]
2024-12-17 12:30 ` patchwork-bot+netdevbpf
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=20241216145637.GD780307@kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joe@pf.is.s.u-tokyo.ac.jp \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rafal@milecki.pl \
/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;
as well as URLs for NNTP newsgroup(s).