Article View: linux.kernel.netdev
Article #23917Re: [PATCH net] net: bgmac: unregister the fixed PHY on probe failure and removal
From: Simon Horman
Date: Sat, 28 Nov 2026 15:08
Date: Sat, 28 Nov 2026 15:08
35 lines
9212 bytes
9212 bytes
On Tue, Nov 24, 2026 at 12:40:58AM +0000, netdev-bot+sashiko@kernel.org wrote: > Thank you for your contribution! Sashiko AI review found 2 potential > issue(s) to consider. > > Critical: 0 · High: 1 · Medium: 1 (1) · Low: 0 > > If you believe none of the issues are legitimate, please reply to each > issue of Medium severity or higher and explain why the AI is wrong. > If any of them are legitimate and you plan to respin, please let patchwork > know by including "pw-bot: cr" as a separate line at the end of your reply > (one such reply per series is enough). > > - [High] The new bgmac_phy_disconnect() reads phydev after > phy_disconnect() may have freed it, which is a use-after-free on the… > - [Medium] bgmac_phy_disconnect() picks the release method from the > device tree, not from how the connected PHY was registered. Hi Florian, I'm suspecting that neither of the above two issues manifest with in-tree DT. And if so, I'm thinking they are more theoretical bugs than manifesting ones. But none the less, maybe it would be nice to make things a bit more robust at some point. Either by prohibiting configurations that lead to the conditions described at setup-time. Or making the tear-down more symmetric with setup. Nonetheless, I agree this patch fixes a bug in a minimal way appropriate for net. Reviewed-by: Simon Horman <horms@kernel.org> ...
Technical Details
Message-ID:
<20261128150858.GI31322@horms.kernel.org>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-373184-linux-kernel-netdev=dewy.ruReferences:
<20261120003044.2366432-1-florian.fainelli@broadcom.com> <179548085846.3135.4498796165187686052@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-373184-linux-kernel-netdev=dewy.ru From: horms@kernel.org (Simon Horman) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: bgmac: unregister the fixed PHY on probe failure and removal Date: Sat, 28 Nov 2026 15:08:58 +0000 Organization: Usenet Network Message-ID: <20261128150858.GI31322@horms.kernel.org> References: <20261120003044.2366432-1-florian.fainelli@broadcom.com> <179548085846.3135.4498796165187686052@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="972942"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:rzXO/jGxe1eamqe1+YTuVjHjieY= sha256:KvADBVPTA7IUQ9xGGR04IGRyBhC3mXg/9rl4gsSaEKU= sha1:h9L84G2QeprIQviT+oXtwpWo/xU= sha256:BqfnVTNKZISvo9s1S5PJ5Roa9IFXPgIxKTGv366/c6w= Content-Disposition: inline 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 50211125F80; Sat, 28 Nov 2026 18:09:19 +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 QSe_6XEqa5DP; Sat, 28 Nov 2026 18:09: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-373184-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 6A1FE125F76; Sat, 28 Nov 2026 18:09:08 +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 BD1E8282F9; Sat, 28 Nov 2026 15:09:05 +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=1795878545; b=AgUhiruDqz9gWgj8JsUZDBJ5zu/p+qF8l27Y93ru3rdR0SGb9cI8QDmDovC/7WXuoz22 cejjpayPGI1F0INmbC2BT/CohDc+3s3izY84J3DMuTBpi6jtQetd80DiAN1qQBoOYhqoZ SYbVL8ll6vDSrhr/qrNeHe9iDco7UKV7pBCnBEx2mzd1JZP38Cj7S9IkngPKwQ4GRDUJX 5urm1vpJZvn2L7Ph2k92h/nP+zxFqTJmstVRE23Q86PriGcknNhCr7/Ybe+0skIgWlEMV K9PDsudJyLnPtaDU5zGnI7u3omD/s3tbkiHUYC2DI9wfFfeObPj3BJTl7IV6XP0tz4A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795878545; h=X-Original-To:Received:Received:DKIM-Signature:Date:From:To:Cc: Subject:Message-ID:References:X-Mailing-List:List-Id:List-Post: List-Help:List-Subscribe:List-Unsubscribe:List-Owner:Precedence: MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=zj6HwMdkz7ovzYXk7gJatQ5LUnkgGX3g1g5SL2sK39Y=; b=ZGECa4qDwTYVeVjXxIGslFAgIeYVu66NycNI0ddOCGlbvJ2/cf1k77osmMKtpGJZpEOX bL2Lqn6mHzst9rWqEPIOptAFB77jHEEBOl8oVHvrq/WTYg22ghClfm1w/j5JYZFI+rzwm I8PGWsxhdZEYagDi8K2hG22ZuWTnn7boUwb6Bf7fjLKiHhNcAIZPLpRLVBfQc8Bp3P3Ii uyZH4dsV240KAQ8OaGTH6jhRwd5lNr/SEfQHcOxUdcqWbpYPA+PA0QTO40zqpFPEYe4jJ KxgWGMXfRR0bFCggaRRyJvidddP9ELcqXbWLhaHGGKdUYZREz67jULri3KMdHYaXkkw== 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=kbjaTlf+; 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 9461D606A327; Sat, 28 Nov 2026 15:09:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kbjaTlf+ 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=1795878544; b=GV7S99Y3z92BDlombHXcKkInEIDgCSditomN4U0bNht9PpNcexyOVTrkUzErLECAYSwJ DJ2U0t9vUZXwHb9sa/OBYdmAk5hWSqS4MKTk3/ndV/lL6ON1q/WAQuYDy8sBeQLefXBmr 2C3MSoo9lv3Aw7bHxH5vn/rw5BlXNr+1EGB3lvK+t5ewIS9GwXYjPEe954uiZmq1qto5O a+EZ7I2qeOl7DbAJwmq861U5AeiN4b0jJ9jtFZZOZWg8qOHjWKiHyJq27pdOd1nX5Cbth KEs+17kPmPn7vD5mP2tl7SKv6wZai72pnaV7S9oI0qHKcZEDAOpfYDxJ0RrO6O3lM6Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795878544; h=Received:DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; bh=zj6HwMdkz7ovzYXk7gJatQ5LUnkgGX3g1g5SL2sK39Y=; b=TgCGUT5HhxxZsTJwmNBZLF+CXQSLCLhlr3G/Dv5A0wZ7oNjH6dXyA+XkG1h6Nwaxjqek /ohV5u80tj+34YVTJbK6ZYUZltEDCCrxKK6WDMzychYMZPhQgU8vyyTakzXZC7ZaukNnN iajs+jvxxJMUioa2rZAnkpNIPcgIN0UXguGvq8IwXtOsfLTbljL7olutlhOCv0aVv3CUW gRXeK+f1fG9TTV/cFk4vFp33/OgXA6S/WppuoWHFRNZrzB2v+9AcV+0RKj14Lj3j+xSsB OIBilIJPQUw5u/x76NsdEsQP0FaissD37ReP5+e4xU+WUjqiBKsVYuBgF/8U++qTRTg== 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=kbjaTlf+; 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 B291A606A31C; Sat, 28 Nov 2026 15:09:04 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EB531F00898; Sat, 28 Nov 2026 15:09:01 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795878544; bh=zj6HwMdkz7ovzYXk7gJatQ5LUnkgGX3g1g5SL2sK39Y=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=kbjaTlf+xP9z5wRm0fQ+HAZbSlEUWDlR68zeHfpnKgWcpXDQWNceSg7fFnqnzxTCf 6r4i17X2AZVKDxVP31YmV1HqhPiaCoz3piJKP3XjSV1H1OMEI6d4OqZ4MKAufAtMiu XpF89o5NOHgfFcSRWbBEFL1GhLcSFlnURHFxRlZMqbvj8WgHLAvf0guIqBr65lOcvZ wU3m1lxMrCte2y0ABzMzLUj4WLYVHTTZp9Y3QsTE7le4d6SArDaPRHnp6wuyk7Pq+E 1bsiKS2B+cIfZVwuJ8DR0Vk160BjvT/ho1lgQCGx9Qi6LGADdgsT355WU0TXy2dK// x+r4UQ28Pxdcw== X-Cc: florian.fainelli@broadcom.com, netdev@vger.kernel.org, rosenp@gmail.com, rafal@milecki.pl, bcm-kernel-feedback-list@broadcom.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-kernel@vger.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 X-In-Reply-To: <179548085846.3135.4498796165187686052@kernel.org>