All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Zapolskiy <vz@kernel.org>
To: Yige Jiang <yigejiang86@gmail.com>, netdev@vger.kernel.org
Cc: Piotr Wojtaszczyk <piotr.wojtaszczyk@timesys.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Ma Ke <make24@iscas.ac.cn>
Subject: Re: [PATCH net] net: lpc_eth: release the PHY device node reference
Date: Wed, 28 Oct 2026 11:58:58 +0200	[thread overview]
Message-ID: <f62962e6-6fa9-430c-bdf9-c15993ce334f@kernel.org> (raw)
In-Reply-To: <rc-review-20261022-ai13-13-8a866c920a94@gmail.com>

On 10/22/26 18:59, Yige Jiang wrote:
> lpc_eth_drv_probe() obtains a reference to phy-handle and stores it in
> pldat->phy_node for lpc_mii_probe(). Neither PHY lookup nor connecting
> the PHY consumes that node reference. The probe error paths and driver
> removal discard the stored pointer without releasing the reference.
> 
> Put the node at err_out_dma_unmap, which is reached by both failure
> paths after the phandle lookup, and on remove after unregistering the
> network device and MII bus. Both puts run before free_netdev(), since
> pldat is stored in the netdev private area. Earlier probe failures do
> not pass the new error-path put.
> 
> The PHY device reference discussed in the linked review is a different
> reference. This patch only fixes the node reference, which was also
> mentioned in that discussion; it does not repeat the proposed PHY
> device cleanup.
> 
> LLM assistance was used for static ownership analysis and drafting of
> this change and its changelog. The review traced get/put pairs, error
> paths and teardown ordering. No runtime reproducer or hardware test
> is available.
> 
> Fixes: 3503bf024b3e ("net: lpc_eth: parse phy nodes from device tree")
> Link: https://patchwork.kernel.org/patch/14502432/
> Assisted-by: LLM
> Signed-off-by: Yige Jiang <yigejiang86@gmail.com>

The change is correct, thank you for the fix!

Reviewed-by: Vladimir Zapolskiy <vz@kernel.org>

-- 
Best wishes,
Vladimir


      parent reply	other threads:[~2026-10-28  9:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 15:59 [PATCH net] net: lpc_eth: release the PHY device node reference Yige Jiang
2026-10-27 16:57 ` Simon Horman
2026-10-28  9:58 ` Vladimir Zapolskiy [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=f62962e6-6fa9-430c-bdf9-c15993ce334f@kernel.org \
    --to=vz@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=make24@iscas.ac.cn \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=piotr.wojtaszczyk@timesys.com \
    --cc=yigejiang86@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 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.