🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #8184

Re: [PATCH net] net: lpc_eth: release the PHY device node reference

#8184
From: Vladimir Zapolskiy
Date: Wed, 28 Oct 2026 09:58
35 lines
9319 bytes
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
Technical Details
Message-ID: <f62962e6-6fa9-430c-bdf9-c15993ce334f@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352801-linux-kernel-netdev=dewy.ru
References: <rc-review-20261022-ai13-13-8a866c920a94@gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-352801-linux-kernel-netdev=dewy.ru
From: vz@kernel.org (Vladimir Zapolskiy)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net] net: lpc_eth: release the PHY device node reference
Date: Wed, 28 Oct 2026 11:58:58 +0200
Organization: Usenet Network
Message-ID: <f62962e6-6fa9-430c-bdf9-c15993ce334f@kernel.org>
References: <rc-review-20261022-ai13-13-8a866c920a94@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1745140"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:9PChX2S2+HKE/RlQnBso0tthvuo= sha256:dgez4OcESitCre6P0/yvwxJHMzNCM3r1w4PrsEompP0=
	sha1:23WXb2tMsmkYO0BQ69nJTJlHrlo= sha256:1IDjhp2nUKfcZ445eQZkrHqfVpXM+unYiyeHOPaW5WU=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id ECD5D125C35; Wed, 28 Oct 2026 13:05:48 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id bIxjTbyvso5W;
	Wed, 28 Oct 2026 13:05:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-352801-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 9E1FB125C33; Wed, 28 Oct 2026 13:05:37 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 2C28D27C71; Wed, 28 Oct 2026 09:59:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793181548;
	b=DgF/GlPH6E0HO9RRdxSIgNyYLwVKX6nl9lSKv1cbrF7CvPpe9DKehufYEOzke2sHWvrJ
	 cq7U1E4JWTxFxTnYHNYG8ErCFrT26Rq+Z5zoN+nlwMnxY7Gxyk35vRJVy6Rv0dfSEiY6C
	 KnDeY3Umf9Hvxr4qPGSMESIEJzmU7QxhUKv8bLwZBYle3mKJKBa3REBr5M+NNLamla3Ep
	 sz5t9wi6T2kDWirBq+HWg2s5/JyzlBPsWzr53nC2CboCax3xKj9VAfPyaojBvgZEIAiNh
	 RDNOE31V5l/WrLQ2qVZdZyFgSTywdEPCNdZQqxKkFOkApxAa+hXD6NltDv709rGYlbw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793181548;
	h=X-Original-To:Received:Received:DKIM-Signature:Message-ID:Date:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
	 Subject:To:Cc:References:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=22ULUd3CSu+xvHleEXSSulHXhaBo3lSWI9UaZrU2MF8=;
	b=hL3DvLXaQ5LF60iHbjD5XZ9JyTrhALZ4kughcdO5OGqbzfeQI3CFWgo0dQmCd2LnohPx
	 ulkjARuuaPItYX8f+cOVtED3tI/2AtewKcJutY1cQFnhN0FqGSZuYFVxo6jnHXnEANPEo
	 NHzPHuBBEllYe/MCla2WQtdnvMkPvFWM7dwzI3nkDqUPsD3JOgg2BVjJ+y23zKPhjQiAw
	 aqA1JC5S83yLXC1R/lxGYiySYlWWK9wMJ6W5837MkvooEQVvq3AjPWrLFtD880kgqwFdg
	 nWvHXqGgiD1aNz2gkeVeMDIlnoDnTGVWgsTtQK6dwzAbdLJTtjiQa3RIt5danrC1VZA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="kk/fUAyJ";
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A4585606A320;
	Wed, 28 Oct 2026 09:59:08 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kk/fUAyJ
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793181542;
	b=xTUHHv2UoJjyyPUXPCkMz5ntd1cBC873MQuEvIHSGeJHIBdvLh6As5FFt+i3wgv4fN4H
	 W62NRvznJDFE0oxlCJOoHh0whr33Qwu/0FXq3AUbXSwlPcN/GXcmzqLHXC7R8Nutxb34Y
	 o49KYqxaBi1rbf3tuVPnBpK76ZUJUVSbc4wmWPYSWmvDNBggxD9co3rMMmMhT4CnYG2xF
	 SgwiirVb3NcjfNmreIhVJKbM5P8KvgJjFTI5BtGjyVhIc4MRYTH7Ey1w7d3JY4ezYuN0/
	 35xsRmXhtDzFWNL4q/ZIX8Gqu5CHGhbkSoM0cXu4iNX4gaQAI3kWN46TNZarbYHnraw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793181542;
	h=Received:DKIM-Signature:Message-ID:Date:MIME-Version:User-Agent:
	 Subject:To:Cc:References:From:In-Reply-To:Content-Type:
	 Content-Transfer-Encoding;
	bh=22ULUd3CSu+xvHleEXSSulHXhaBo3lSWI9UaZrU2MF8=;
	b=t0+wQ0ZHnBi3nwBX49rEdsNf234RYDELO/fxMdjBsGbOiZC3QLkCPccLjupuY3UUP/9G
	 f4eI9GCAKOv7++IWAx63Od9WH9FPeUGqrALM4w9nzvyRGyo15dWZxp4K1sp1vlMTgmiAY
	 aEYmR/NIQNO6e31Na4iIUq2yWtzDopck1u7UgG+t10b6L3PtlzG3Q79sGWeLSVNV7lri/
	 OFnv055cm+UmxAzz2aaV45i72glGWZdG8lL+CKP3Zm8HoRwy0TCXUOOpy7IosjHmBViSN
	 oUqTWoNgJ4aSVhNYBHAvnuy/9/N/YeBYTP2F4dFj/xTtH8QSvU7iWnxMd4b8kX95CNQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="kk/fUAyJ";
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 858F4606A31D;
	Wed, 28 Oct 2026 09:59:02 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1FBBA1F01829;
	Wed, 28 Oct 2026 09:58:59 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1793181542;
	bh=22ULUd3CSu+xvHleEXSSulHXhaBo3lSWI9UaZrU2MF8=;
	h=Date:Subject:To:Cc:References:From:In-Reply-To;
	b=kk/fUAyJ34QCYxcwMJXl2m7CliIyzgZfjPy7G6JwhCDM8xbN1o1a+XPtFRu+v3BCg
	 oP3XeEq1McsZeWwM7uoieGqHj3segBcVrwVQEg12ctXokcefklo3t9TltUf1UqWOos
	 D+6jmzisx5iyjJ90OVIIjpUMqfaB+jdlr3/kKQkoVKfuUVMNnxSAS3q1WLZH4lsDg5
	 ZoNtWsznbk+RSXeOaGueGlN8X59qpvIhL1wDBZcGPNwtvjP64RMx9D4ccTwdwu3Ekt
	 Tr2LLmeTRDWL+KfgUrKgNEtvJpAVIBhOQsupkE0a51yfccCiBjZEaQZshuIInDc3Zb
	 D4gUapcafq0og==
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-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>
X-In-Reply-To: <rc-review-20261022-ai13-13-8a866c920a94@gmail.com>