Article View: linux.kernel.netdev
Article #13085Re: [PATCH] net: ti: icssg-prueth-sr1: Fix device_node refcount leak in prueth_probe()
From: Xiangwu Lai
Date: Mon, 09 Nov 2026 08:37
Date: Mon, 09 Nov 2026 08:37
33 lines
10259 bytes
10259 bytes
Hi, Please find below the additional information netdev-bot requested for this series. How the issue was discovered: manual code inspection of the error paths in prueth_probe() while auditing the SR1.0 driver for probe-time resource leaks. Whether the issue was actually triggered: no, it is purely theoretical. The affected branches only run when the "ti,mii-g-rt" or "ti,mii-rt" syscon regmap lookup fails, which happens only with a malformed or incomplete device tree. On a valid DT these branches are never taken. When they are, probe() fails with -ENODEV and the of_node_get() references taken on eth0_node/eth1_node earlier in the function are leaked silently; there is no stack trace or error message pointing at the leak itself. Hardware the change was tested on: none, it was not tested on real hardware. The change only re-routes two error branches to the existing put_cores label, which is already exercised by the other failure paths in the same function (e.g. prueth_get_cores() failures), so no new cleanup code is introduced. Regarding the Sashiko finding: the same leak in the non-SR1 variant of the driver (icssg_prueth.c) is real, and it is fixed by a companion patch submitted at the same time as this one: https://lore.kernel.org/netdev/20261030085651.1944-1-laixiangwu@cmss.chinamobile.com/ Best regards, Xiangwu Lai
Technical Details
Message-ID:
<20261109093500.54322-laixiangwu@cmss.chinamobile.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-359134-linux-kernel-netdev=dewy.ruReferences:
<179335102798.3327.13730382084781364050@kernel.org>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-359134-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: Mon, 9 Nov 2026 16:37:09 +0800 Organization: Usenet Network Message-ID: <20261109093500.54322-laixiangwu@cmss.chinamobile.com> References: <179335102798.3327.13730382084781364050@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="310472"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:g44YQJUWL1/XjVsamFIwgq5j6TE= sha256:7uc5rwOwS7TLIkceoJZrHbhfK5+3/6PbsYIMHlgspDs= sha1:kf9z0Dy7wEZG+dsABIZ097KWv/g= sha256:EQF/AsEu/1sdE0HAph7mxMFzZ0LKHTeuAY+xyN5Xfcw= 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 0CEC111374A; Mon, 9 Nov 2026 11:42:18 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -2.751 X-Spam-Status: No, score=-2.751 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] 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 z1R08aM36krz; Mon, 9 Nov 2026 11:42:13 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-359134-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id C2F48113747; Mon, 9 Nov 2026 11:42:03 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by tor.lore.kernel.org (Postfix) with ESMTP id 4E97FA5A47; Mon, 9 Nov 2026 08:37:43 +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=1794213461; b=qfBsNBOn2gkxIACZo3eRP6St49M8KH2uzfT2BJTMI9yWknaPhM+KzYP+fftqGsueS3op bOLwXCrqdLBuoHwLYbwQ1hQDbOB2BpkHHIEYKNpB0LGwTyst143ZVrlQFMwyV8gFRMk8W ZQUoikLWzugydVCRfhobKFpuearCT0jGndggK2nEyCLTGVPa2At1mmSR2q4N2y0MAs2Rg LPNVqLp7LGHKyrKCy4pFhdOMKlBDpVNwWFR4t5akEyKdaZ1BBPCKNDWemL4fYIhPuW7Kb 4Dt1O0SJIww05uHsv1+yGj3+V9e3Pe5Uf6AA4Voe9sVveGb8mY+0akeToW8u/dZ8Rtg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794213461; 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=nC1Wszvh4Y9MkwTmdjUSmc1pvfFIw9wR53jTSHBM7fo=; b=KeumIwOou2jN0PsjYUH0TOwmsiCURFlZAGApmgT7ylHKZJQ2Xqjx5TMMdnpl5ntwxfBq Oyo3drcYSawMKu+XNJDGla332gXyeZFsWfXxMgxxkfqu+FJlwrgg6uGsIKjdxLEThYkcI +3ZbR7T2mVluqvQnbZ4yeO/SyKEb7fJDxdxBgb+/Y38W+RG5Y/9ajPBXnDGAfa6eOLbQf /hkLnY3YVhUIm0+/3sX6c00S96CfdTn5uyZeLsYrFMtzSXtjt/aQ1y7FiHBwDz5C8S1R4 MGy/AzXNJu3BA2/mtxJt2/dpu72QOFdZbb9uo4hGMmgg/amkIyMU28bQNYCFYKOF8NQ== 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=zLzYjUX5; 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 27406606A335; Mon, 9 Nov 2026 08:37:41 +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=zLzYjUX5 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=111.22.67.135 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794213460; b=gani+FA0xHMM894ieYPXAuWiv2e7jnKSABBNtuhT710W/DMH+A3x+2iGi1oGyuA4wpFW 7YgnH/OUL/V4vbA97sEyn9yKeg+cip2yqrer3a/aT6rxaPD5zrUQ5Ujw4UnPVChTUVAVV M00KlCXp+7OPM98F7VJrF6Y7TDclIOVeqLCjfCAGM31FreLvTo9dUed5WX/bXlTI/cH37 hF24Dy5zKReIcLUI/xF92S19nNhzioHwo29ZvkrGRhHS6ryY+jbWgR6v62RXQ2Tgsks3q y5ATESIwhDd4MQySaVOQCOMu8XH75CDCldeF6fR/5N2Ecchj39OJBscn9BUOg8I6phg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794213460; 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=nC1Wszvh4Y9MkwTmdjUSmc1pvfFIw9wR53jTSHBM7fo=; b=rXMB3b90GuzoV0JAxwo4EctDe23zi2ADNaPqOk4q+C4yPWcfIpajvNUbxBDnCLpZ7M6v +inllXkmF0nN7s4CCtpWdDQMUbSbTRBwHgx/9yxPrpN2M9GBA+cTaJc8GVyHWZCjYUa65 fNjAgBKh4tS0SMYZFGcXihrKZW/k8WhV87RW5XGLhkqBPStg3nTJZLd3QGDQDjKMWvT2w PhLzuBgky7ehX2dbe8GOzDu0wCimjakwLSHSgZY0oLsxABmS7T333YLSdiNpf9p6z22yV 2hfQY+KfcwQgpa5QLN7bN9jng2Hdt65J9YulA6iQAaoL7hbn/O3Qvp3K3VmcBtISipQ== 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=zLzYjUX5; arc=none smtp.remote-ip=111.22.67.135 X-Received: from cmccmta2.chinamobile.com (cmccmta2.chinamobile.com [111.22.67.135]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E700606A31C; Mon, 9 Nov 2026 08:37:36 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4E700606A31C 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=zLzYjUX5q2OAokroJ266wewJfAlZdbX8Yu8TWv+pWhkhAy0NaATWmXoq6ABRfIAcqU/BUjUsni+RX 3U+Ap6P8w9gqen79WBoA/fgS9MmlOTdDK6wAOYG4Bjrl5lZwoPjj0tmKEQk2ZrREqRBsaTFnFwOYBs xwqdMiiGPwh0thZI= 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-app07-12007 (RichMail) with SMTP id 2ee76af18636a24-c4277; Mon, 09 Nov 2026 16:37:13 +0800 (CST) X-RM-TRANSID: 2ee76af18636a24-c4277 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 X-Received: from DESKTOP-3K8GUTQ (unknown[223.108.79.98]) by rmsmtp-syy-appsvr10-12010 (RichMail) with SMTP id 2eea6af18637b98-8865f; Mon, 09 Nov 2026 16:37:13 +0800 (CST) X-RM-TRANSID: 2eea6af18637b98-8865f 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>, 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: <179335102798.3327.13730382084781364050@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