Article View: linux.kernel.netdev
Article #25026Re: [PATCH v2] net: ethernet: sunplus: spl2sw: fix OF node leak in spl2sw_probe()
From: zhaofeng2
Date: Tue, 01 Dec 2026 07:11
Date: Tue, 01 Dec 2026 07:11
33 lines
9815 bytes
9815 bytes
From: Zhao Feng <zhaofeng2@cmss.chinamobile.com> Hi, Thanks for the second look. Both in-scope High issues were already addressed by a follow-up patch sent later the same day: "net: ethernet: sunplus: spl2sw: fix further OF node leaks in probe and remove" Message-ID: <20261130071505.1232-1-zhaofeng2@cmss.chinamobile.com> It drops port_np on every exit from the loop body (the two continue paths, the three goto out_unregister_dev paths, and after each successful iteration), drops phy_np on the -EPROBE_DEFER and init_netdev error exits, and drops mac->phy_node both in the out_unregister_dev unwind and in spl2sw_remove(). It applies on top of this v2. You are also right that the v2 commit message line about the post-loop error paths being "covered" only referred to the eth_ports_np reference; the follow-up patch covers the phy-handle references on those paths as described above. The remaining pre-existing issue (net_device registered before the driver-private fields, phydev and NAPI instances are set up) is a probe-ordering problem unrelated to the OF leaks; fixing it means deferring register_netdev() until after the NAPI/phy setup, which is beyond this series. I can look into it separately if the maintainers want it addressed. Thanks, Zhao Feng
Technical Details
Message-ID:
<20261201071121.258-1-zhaofeng2@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374778-linux-kernel-netdev=dewy.ruReferences:
<179610001649.3146.6303117369174207988@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-374778-linux-kernel-netdev=dewy.ru From: zhaofeng2@cmss.chinamobile.com (zhaofeng2) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH v2] net: ethernet: sunplus: spl2sw: fix OF node leak in spl2sw_probe() Date: Tue, 1 Dec 2026 15:11:20 +0800 Organization: Usenet Network Message-ID: <20261201071121.258-1-zhaofeng2@cmss.chinamobile.com> References: <179610001649.3146.6303117369174207988@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1645041"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:gkWFg/6PYFrxPyk8sByn3x8HBB8= sha256:16Wmcw5CI+wEnihJrTxnu9iIWDkP2/ZDseg/aMLgX0c= sha1:kBKcofSepBzctbz09xOASRGI3XI= sha256:0iPEYQGLmm36jXPf7Wi4bnwSwQhOrTTxZcdyY96ge60= 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 D3D5111728B; Tue, 1 Dec 2026 10:12:02 +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 NmeKyz1Wbuum; Tue, 1 Dec 2026 10:11:54 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-374778-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 sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 2C3E811723D; Tue, 1 Dec 2026 10:11:44 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id 3609223946; Tue, 1 Dec 2026 07:11:41 +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=1796109100; b=vmXGAnPevxGSsn/dEBqTnDLBTE14FRHogjFpaWyOUpXj4DvYzcJDD61xGR1qxiMGd49G lqlgli67keHIGou+Z5fpHU6824qI8tB58dk1ZaaEWJn2PfVTiXuO5fDHjCZvWvlJz48eD hB4APUiwqWUdpO6fTwyjpyO3PnEBoift1nOv+ooU3GCuO2xVs5zZaMJqIUefMJzXve/qX w7Kfij1xos/RUTpuWRwyJiTrL0KA06EQa8raesbYRYlKxEDVUPLw5L4vFoXgPMes62x0G pStWI1ckvhcWx89lW5XjJtiqzhUWJ4BntnE8AAgtojsZYQW3ASVbzLhIsGTz+VLtS7g== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796109100; 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=tQjRaINE6zZTk1raLRAdMeC70skKwZO0SkqtqJF9318=; b=B7aHGEsf3crQ0y+kF0tZTTP9DikVLzIy8WX5CVUEeIWNjDqfdUuq88MWB92wjkTAbJWk y01U2TygQXfaGSJTaYFSrZV7JO7O2Xe1DEm0KP4BehM7sRxNwtMJ7e3OVzksblyGo5ZOI DmSSLMz3axDCWwMp/80Nm1Z3hWV8PsBu+WddjT/zTECB8qcInTLtGBeo7HSyAGxr6SGyd +i1HSCv/O3RDqsyC9qkFrMJoep/TgoJMr/E6XAUWspnQVyV1trxbzB9oq4Bh0VcfqT+mI wPC3mjO3zCm+i3uNFjoyXm9/KVK2bKbgpvwu5dIRLXWwAmctvRhdHuCBJvDaLxwBM0w== 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=iENYmqQ5; 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 4DAF5606A693; Tue, 1 Dec 2026 07:11:40 +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=iENYmqQ5 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.139 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796109099; b=GrmX5uJAxXgS3L19XKXyv1xT+TcBMv2R8ptt4z2qODwIq/Dec6XRnm2qRrKi8xGOSMxV NbOezZE/ZG9J0f5x2AlrmZwYjvgVm6wtb3tTOLKYo1cWXDrPozRiaGcw613j31GVKr7OD aVD0FhAGhM3V3y2yS68TYDeGHVDNqBZWirnpZUC0y9CB1w2cLI6JmjZHt/RXPY7M/7wsY Qe1vIlJWc6fWzytlPbImHaCRXdL9V2o6WlBSEA4kRfLtMO0mYMBzYIaE2z2PxiSHET9q0 HOLZfPspbJ9JgfOYS8URY2pRpsPJaw22T6LXHOWfdgSIJn7euWSqDIY43Q5WroJLRlg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796109099; 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=tQjRaINE6zZTk1raLRAdMeC70skKwZO0SkqtqJF9318=; b=tR7JBkKT7o5Nk8BJ9XwJYxQcBHjleVXo8kzzpbYXQCKuKNYdtG74dpC/sjcGPIUcpKz7 VmNhben7FHwtFcW/kLAav+4MHGB9e9yIgxWKjGZL5oA/pcS74+viVbPrSc4jfwkiL6GJQ xcoQQ7Olwzr54Oan+7xbYjC/rC1AA2UxI6yXyndDXpUDTLMX+j61sDb6Il6zTCytMjPaH VaHAu1ZoFnLAPymLZHdl8W8bjieLuYOpmwoIVBquhlaIrTIBmzU2z4NXTIiT4XeICguvg pd3mT22+2chPPjw/o9l/6PoHTnaRzxjqHCbZdK6s/yoPyVXHyN7nUr1c0lP9S/q39vA== 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=iENYmqQ5; arc=none smtp.remote-ip=111.22.67.139 X-Received: from cmccmta6.chinamobile.com (cmccmta6.chinamobile.com [111.22.67.139]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAB73606A33C; Tue, 1 Dec 2026 07:11:36 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EAB73606A33C 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=iENYmqQ5R4d1fjtt1NMgNWZ6HcLFRqN9pmXVG/cP9JbplpE+uy9ChTFLeUenKd5LdVktoODyZXZoj 7qeyytLzLZKDtXYk4TDyXIDakLzARbbNBY7zKiMnxOdGUUhHbEqnvkvzYMTvIJhvJubrSGyHd6DA6E uTSmQ2DfPlbcuw+Y= 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-app09-12009 (RichMail) with SMTP id 2ee96b0e731bebc-88ef2; Tue, 01 Dec 2026 15:11:23 +0800 (CST) X-RM-TRANSID: 2ee96b0e731bebc-88ef2 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from Z04181456177947 (unknown[10.55.1.71]) by rmsmtp-syy-appsvr04-12004 (RichMail) with SMTP id 2ee46b0e73190aa-149af; Tue, 01 Dec 2026 15:11:23 +0800 (CST) X-RM-TRANSID: 2ee46b0e73190aa-149af X-Cc: Zhao Feng <zhaofeng2@cmss.chinamobile.com>, Wells Lu <wells.lu@sunplus.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: git-send-email 2.55.0.windows.5 X-In-Reply-To: <179610001649.3146.6303117369174207988@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