Article View: linux.kernel.netdev
Article #14554Re: [PATCH net] net: ethtool: phy: fix NULL link_topo dereference in phy_prepare_data()
From: Andrew Lunn
Date: Wed, 11 Nov 2026 13:34
Date: Wed, 11 Nov 2026 13:34
16 lines
8799 bytes
8799 bytes
> Reaching the crash needs an IBM EMAC device with a fixed-link node, which > was not available here, so the fix is verified by compilation and code > inspection only. There is another way to look at this. The MAC driver might be broken, it is assigning ndev->phydev, which it should not. It needs to call one of the helpers that get to phy_attach_direct(), which sets ndev->phydev. Are there other MAC drivers which assign ndev->phydev? This NULL pointer dereference can be considered good, because it might be pointing out a bug. So we might want to keep it. Andrew
Technical Details
Message-ID:
<1fb006fc-aab9-456d-95c2-0e94df1dfb09@lunn.ch>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361082-linux-kernel-netdev=dewy.ruReferences:
<20261111072146.3293821-1-xiaolinkui@126.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-361082-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net] net: ethtool: phy: fix NULL link_topo dereference in phy_prepare_data() Date: Wed, 11 Nov 2026 14:34:36 +0100 Organization: Usenet Network Message-ID: <1fb006fc-aab9-456d-95c2-0e94df1dfb09@lunn.ch> References: <20261111072146.3293821-1-xiaolinkui@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="862341"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:jpDMySr/LlqINWwGNSonh+bbOlM= sha256:YDGIRQc2kVs6haSD7C4xB/LRp5ufeNGiKDqjKPg3wz4= sha1:91FiW3oFgo88DfNj9kYcr97lrzU= sha256:6zC6Qr9bFu8xBYlVMua/u4A38Lg+i08xA1Ln823fqdA= 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 3142B113EFB; Wed, 11 Nov 2026 16:41:47 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.05 X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-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=pass (1024-bit key) header.d=lunn.ch 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 a3yEHGhkO4xh; Wed, 11 Nov 2026 16:41:44 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-361082-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id D901D113EFA; Wed, 11 Nov 2026 16:41:34 +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 1946F14894B; Wed, 11 Nov 2026 13:35:11 +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=1794404105; b=XLCDYdMJtFgcYa8FauNbLCae8di1TzoNn9elM8UbeTs8f2kOi5vMTEBKksKHqsknD+Va 5Zf8UItErjSffN9NJXcrpNWptpijaxkkZg1zPqSKfWyf4QMwug+R8CRVTGgTLHIyCIajK HJvxGeuSwifAbSpLT5buLpYtgQZTM7wKmbydYslgyVaY/609IurSmUo1JYWEvB5xLOHxi rBzZ1nKc0VyReY3qGSasMtKI51I2DplzcsMAOQbRZaaa/MJe8iIuLMgRPUHFsHJYbVlco 6PrvFt71vKRDWEcK3mVT3pJ09wwJnVzzg2nIDfq3U7PAZStGKHXfp7aGRSal8K7hIvg== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794404105; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received: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:In-Reply-To; bh=skpWLWubRAy/usrZud3Ziz352i+vYVGgRMybtoWruq8=; b=krxIXplG1cDK6lWT0/+BUgmAp5R/v76F+c2T+9/XhFiS/UlvDWBqMJElo4/PO02IA/ZZ wtRtHKJ/eK2UA3jFVcs20o6PpDrMD1jKIDEnAowzgmAM9aynkHRoz5oaBRM0TcyeOWY97 nK10s8p/RwueaprxaYv7O4SVntQ8M0UuAIpFwJuCvFtGOKTXLXZg1DsKfW4r41FiLr+U2 l7K/KHqsrteJo19v3V04mKQuLSBi1wW1w7j7o9ONjShvda9+aSBIc7B2FkSeRVpKsyqny kSf7IPouT0J9v1M2B02R+wgBEz5Z7DJ82XXB+EM1Xo1AjoAVM4yZjADZpElNFlIgp2A== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=PVHR2nY0; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; 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 5B633606A331; Wed, 11 Nov 2026 13:35:05 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=PVHR2nY0 X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1794404099; b=LAbzrKqcBQUV2mJ3VdiyKpRsBs+gS/6JpRemAj7c5LqXYEHxSaoiT0UBxzW4n4fQzx26 a/8x7ynGxEquMabTVSCYhA3JofLK/vP9MquFfsCYKJLXCbuTd1ym0GEXYNv5woERsdG1m /gDvGpWLg5SeJ4gUTkIgDtgXGFtwHyjeoALjBUj9GAkbCXxWYdwyOv6XlVLcp7LiAlXMt FKVOZER9DPU2YhNgRFu+0o4f2eHHtK9YbSL2Mii16e4doVJLMyqyF05r2LQlGTAOiCF/p zxEblyoC683G+8vxtwbH0P2tBDKF61oc2F8o1z68oNLnwIhxbnBglCgBV08hkIeccbw== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1794404099; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=skpWLWubRAy/usrZud3Ziz352i+vYVGgRMybtoWruq8=; b=wshoP2gBU5XCl0c8OcbVZDz5XnxIUxMCZKand6IUsz75iDbuxTzcHCxGfRMk9ICPCVa5 mMUgGMJjFLIXSLeraDBO1cm/a3efYAlK9ofbAPdeig6q4Vxjvh6PFAQBTuHUk+yGBH7sC ZusdgnU63DUxCkNdZsC/nSgXzwwzhe8NCuowlKo0vYRwAeUi+cVbIA8cB5caMSNIuPhvf 1sJ52Hcg0BbqWSZoSBi++z+g/CbjcS2PTcZVEVyWXdUJQx0azjZtQoDSVodOA3y51H/fn 5HbiSSBAwpQjqmp+w3CtdUS1i3U1vVk+Xr0hveI+vBZ6W2BewATiCgZaYkAvhUhSEFA== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=PVHR2nY0; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3647A606A324; Wed, 11 Nov 2026 13:34:59 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3647A606A324 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=skpWLWubRAy/usrZud3Ziz352i+vYVGgRMybtoWruq8=; b=PVHR2nY0MMYuGf668uELspapGf 7nOaQqo8LtRhBp/dn/gI8RhlOcuhiOInxKF1ZGD3ik7RIX6zijluWeBYwr478zIL9BG1fS02t7Htv +f0sqAYuvOduUrYXqmAe0X8ZsCCMZw77VEHTfUiarr8v3CT1N/YpuD9vhXj1cN7EyCoA=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xR8TE-00FksV-JI; Wed, 11 Nov 2026 14:34:36 +0100 X-Cc: maxime.chevallier@bootlin.com, kuba@kernel.org, davem@davemloft.net, edumazet@kernel.org, pabeni@redhat.com, horms@kernel.org, sdf@fomichev.me, nb@tipi-net.de, 2022090917019@std.uestc.edu.cn, devnexen@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, stable@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: <20261111072146.3293821-1-xiaolinkui@126.com>