🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #13568

Re: [PATCH] net: ti: icssg-prueth-sr1: Fix device_node refcount leak in prueth_probe()

#13568
From: Xiangwu Lai
Date: Tue, 10 Nov 2026 02:38
18 lines
9508 bytes
Hi Simon,

Thanks for the feedback.

The SR1.0 driver shares the same port scan loop and the same checks
that follow it, so the same analysis applies: the
eth0_node == eth1_node comparison is dead code for the same reason,
the uninitialised reg value is used when of_property_read_u32()
fails, and the loop can leak references both on duplicate reg
values and on out-of-range ones.

I will fold this fix into the same v2 series as the icssg-prueth
fix, as you suggested, and the port scan loop clean-up will cover
both drivers too.

Best regards,
Xiangwu Lai
Technical Details
Message-ID: <20261110103500.3142-laixiangwu@cmss.chinamobile.com>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359764-linux-kernel-netdev=dewy.ru
References: <20261109170036.GT18859@horms.kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!nntp.comgw.net!eternal-september.org!feeder.eternal-september.org!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359764-linux-kernel-netdev=dewy.ru
From: laixiangwu@cmss.chinamobile.com (Xiangwu Lai)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH] net: ti: icssg-prueth-sr1: Fix device_node refcount leak in prueth_probe()
Date: Tue, 10 Nov 2026 10:38:44 +0800
Organization: Usenet Network
Message-ID: <20261110103500.3142-laixiangwu@cmss.chinamobile.com>
References: <20261109170036.GT18859@horms.kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="503598"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:NqG4TwzO6V3PzrfxyQBQW1EAYnk= sha256:+/UvwOWkK6nZ61Af+/Qnd+fh6kvlWrd4ZJQQTvR0L5Y=
	sha1:JQdpf3F+rbllvZuVXNn1NfMYqWo= sha256:5I6kan2MCg7c74VH2IM5dyVLMCMh8BpYkbNwA4DJFbA=
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 10BDB1139E5; Tue, 10 Nov 2026 05:44:19 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.75
X-Spam-Status: No, score=-2.75 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_INVALID=0.1, DKIM_SIGNED=0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=fail (1024-bit key)
	reason="fail (body has been altered)" header.d=cmss.chinamobile.com
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 a6aYZFKMBm7R;
	Tue, 10 Nov 2026 05:44:16 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-359764-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=cmss.chinamobile.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id EE00911397C; Tue, 10 Nov 2026 05:44:06 +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 9FE22A400C; Tue, 10 Nov 2026 02:39:08 +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=1794278337;
	b=aJapCOiRa86bdjEHJ0vJ3Eso3IssWIF+47Ja91pxqzkSAE/1VLxWWtYLLiERjrwOcPE7
	 FC0rEIcCTGlxdc1zdo+yH2qZO6/HziOmwAu7D9Cq6ZvKByLOBPrECjTh7VMpVojXWzy4l
	 hiVo2s8oMCA2CB5GWLyIbfetdSRZqaDLJiRzHKF6lfhu/W6rtVvilAW83bwDlpA4mewUU
	 19bK+gVO3tnrRMwVT+l8VAMtN3QxCHW8BoWb6xzspwDxD4hrvrUNfGKAEgsNlF19ZGwQL
	 iugtZDZ0Q5vFCoTccGt7w4oHeTekQw3QRFVT5uOSbszE7OQpMikgMLYPEBbe4IJwBnQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794278337;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:X-RM-TagInfo:
	 X-RM-SPAM-FLAG:Received:X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:
	 Received:X-RM-TRANSID:From:To:Cc:Subject:Date:Message-ID:X-Mailer:
	 In-Reply-To:References:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:MIME-Version:
	 Content-Transfer-Encoding;
	bh=bDtILV99THZP4Ptw4aE3mDtOcJSMnQXEODVTmpcW9Nk=;
	b=qajSc3qgeG9zQbRueNijJCW0Y9smTkMKayY6QbwoCNaL1K0H5lvGeSSWK5topE7N/26u
	 GQNPYPMWPdqICQakFHbcfTE8rl7Eol5halNwJ2cTg6AK5USd+YF7rQxCm/8PQVh9A0TW2
	 Zj1amEY5xfjgC0qFdPPUPA9Gn8GjigwFB5FMQB17V48UpER/ej+IeF0k0rlOczpD75113
	 hzdjLSabv/qlctVQ4QqqUoT7+jYoxU9rqyJsM83RBZHwJUYpUxaDcKkECHW6CoejHnf3i
	 MTcrDazCMXQ8YtNU3ixAJZkN5qEc8OUB9aHRF/X3RIF8U74v57agTxYFT8GPu/5yK0w==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=jORdYAtT;
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	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 C295860A2616;
	Tue, 10 Nov 2026 02:38:57 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=jORdYAtT
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.151
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794278337;
	b=HHQV936YDavAz5l5pfR3RgD9r4qKbUPY9N5YJoCsQJkZ8wrQH/7BM5SFtIlqMkExxZ47
	 1XpX0OUixNkIFics7sGeC6NJAJvkxpPl9xQw/swf8KEoy0dD6N4r9lPod0ckupn9CG2HX
	 A0f0/WfuB5xuuAaan8o6I5vn/08nMCezb2EwllSRdi3U7Ne1XxKNKh8XaW7LGh1ZibKIQ
	 YcO5oHaAQgyGV4y1R6fAVFfQSUgNfOCri1RfBXodQzvby/pwWMJGSZcCFQIWgyNNSAHHB
	 WFRR/YMXHaNnO+G7/XdgjWl8YqbHuaN0nIL/dcmEn8hGauH4Csl7o3DTSWH/l7FV9EA==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794278337;
	h=DMARC-Filter:DKIM-Signature:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:
	 X-RM-TRANSID:X-RM-TagInfo:X-RM-SPAM-FLAG:Received:X-RM-TRANSID:From:
	 To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References:
	 MIME-Version:Content-Transfer-Encoding;
	bh=bDtILV99THZP4Ptw4aE3mDtOcJSMnQXEODVTmpcW9Nk=;
	b=MLaI/eb11WZNtb1Fecc28MjJGLxsHZb1xJbTyOOpU09EHV6BbRIANNDp+w4O5PuT9Q4U
	 CvzjHJzYE4WL9C/df9MROpm0zCcNj5Ymp4Q/5Jov9/M0BVdlQkZmZHowmvGeO8RqdEf0u
	 f4j7RwCl7jWfB26jJlEZBr/7pbdrv0hKpz9li+zMb4me69IkxTii+R8rlz8Q1T1NSO7h7
	 6gTGWPZZeH98ynX1BUDnO8z+10sHqQ6KAEovza9a52uVS0p8jN9GfMmIhwclEmAomB6Sa
	 4sy0Em13hoZE8hMnmr+t7227xoxhVmMpUFlOyegYuW/sKPNT4NSGTarmwf0CbRCHZiQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=cmss.chinamobile.com;
	spf=pass smtp.mailfrom=cmss.chinamobile.com;
	dkim=pass header.d=cmss.chinamobile.com header.i=@cmss.chinamobile.com header.a=rsa-sha256 header.s=default header.b=jORdYAtT;
	arc=none smtp.remote-ip=111.22.67.151
X-Received: from cmccmta8.chinamobile.com (cmccmta8.chinamobile.com [111.22.67.151])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3C1AE60A2610;
	Tue, 10 Nov 2026 02:38:53 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3C1AE60A2610
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=cmss.chinamobile.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cmss.chinamobile.com
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=cmss.chinamobile.com; s=default; l=0;
	h=from:subject:message-id:to:cc:mime-version;
	bh=47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=;
	b=jORdYAtT+f+bd+o7EXeeJbohiIM42LB52YWbvvzRv9+q0NveaINzb0ODH2Puei5G/zi3vtLcgqlwx
	 rlU0i97e/esfIY+S2RZ4D0V9X9lQBBE4D9PM1q0SaFGRYWAnbwWBWbW0YvuR6SfKd5j+fYqLnTPqzL
	 ZN0Dfa95aR2gDE7A=
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from spf.mail.chinamobile.com (unknown[10.188.0.87])
	by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee66af283b05e1-96172;
	Tue, 10 Nov 2026 10:38:47 +0800 (CST)
X-RM-TRANSID: 2ee66af283b05e1-96172
X-RM-TagInfo: emlType=0                                       
X-RM-SPAM-FLAG: 00000000
X-Received: from DESKTOP-3K8GUTQ (unknown[223.108.79.98])
	by rmsmtp-syy-appsvr08-12008 (RichMail) with SMTP id 2ee86af283b5717-a33b1;
	Tue, 10 Nov 2026 10:38:46 +0800 (CST)
X-RM-TRANSID: 2ee86af283b5717-a33b1
X-Cc: Xiangwu Lai <laixiangwu@cmss.chinamobile.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>,
	MD Danish Anwar <danishanwar@ti.com>,
	Roger Quadros <rogerq@kernel.org>,
	Jan Kiszka <jan.kiszka@siemens.com>,
	Diogo Ivo <diogo.ivo@siemens.com>,
	Haokexin <haokexin@gmail.com>,
	netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.50.1.windows.1
X-In-Reply-To: <20261109170036.GT18859@horms.kernel.org>
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