Article View: linux.kernel.netdev
Article #2594Re: [PATCH net-next v5 3/4] net: phy: serialise attach and detach with PHY driver bind and unbind
From: Andrew Lunn
Date: Tue, 13 Oct 2026 02:36
Date: Tue, 13 Oct 2026 02:36
20 lines
6940 bytes
6940 bytes
On Fri, Oct 09, 2026 at 09:05:49PM +0300, Aleksei Sviridkin wrote:
> phy_attach_direct() reads phydev->drv and d->driver with nothing held
> against the driver core, then calls into the driver through
> phy_init_hw() and phy_resume(). An unbind that runs during an attach
> can remove the driver under it, and an attach that runs while a driver
> is still probing can call config_init before the driver's probe has
> finished.
>
> Found on a Keenetic KN-1012 (MT7981) while testing how a port copes
> with its PHY driver coming and going, on an OpenWrt 6.18 kernel.
> Unbinding the wan PHY driver through sysfs while "ip link set wan up"
> ran oopsed on the first attempt, with nothing added to widen the
> window, inside the driver's own calibration code:
Given the complexity, i'm don't think it is worth fixing. Unbinding
modules is not a normal use case, it is more of a hackers tool to
speed up development. So i can life with crashes like this.
Andrew
Technical Details
Message-ID:
<1b3b1e49-1638-4dce-ac45-300d76e2559d@lunn.ch>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-345341-linux-kernel-netdev=dewy.ruReferences:
<20261009180551.1234107-1-f@lex.la> <20261009180551.1234107-4-f@lex.la>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-345341-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next v5 3/4] net: phy: serialise attach and detach with PHY driver bind and unbind Date: Tue, 13 Oct 2026 04:36:13 +0200 Organization: Usenet Network Message-ID: <1b3b1e49-1638-4dce-ac45-300d76e2559d@lunn.ch> References: <20261009180551.1234107-1-f@lex.la> <20261009180551.1234107-4-f@lex.la> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="1941462"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:ER8K1qNMZgmadHsD1DCBrWaRs24= sha256:QNKYUyQ8M4Ibn98/vO8CKmaXysviOhT8Tja70hiOdJo= sha1:THmgqW6pwHbI/5oSLpBXy/AFfbU= sha256:7SHdzYEEPpOXyobRSO2+O4gjNjz3WgQzOfqpFDeVg9k= 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 77F3B10FD4D; Tue, 13 Oct 2026 05:38:21 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.051 X-Spam-Status: No, score=-3.051 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] 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 2pZ6YLNaIRbK; Tue, 13 Oct 2026 05:38:18 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-345341-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114]) by mail.dewy.ru (Postfix) with ESMTPS id D1BA810FCF3; Tue, 13 Oct 2026 05:38:09 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by tor.lore.kernel.org (Postfix) with ESMTP id F02B82D374; Tue, 13 Oct 2026 02:36:36 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 447C6472530; Tue, 13 Oct 2026 02:36:23 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="4QYSSTy0" X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 277C44718FD; Tue, 13 Oct 2026 02:36:21 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791858983; cv=none; b=u8dZQUVyi/GPv4FHks+M7pDb5JUqghdsar7T+HOg6sr3OI+qU9TiUwYDyes35C6moV5ggEjxEtDHCxBH7YyO7CnPyW5cpIqrYiCroKuf7byYlchbtBOjPqeaPiYBDRlqMAeSZKTtPUNxEmY7U7wkFysbFVzn6y3Jj69RegsgpRk= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791858983; c=relaxed/simple; bh=c+vZOs4AMstSBp8TqoqmWWZhW+Sl/Vx5Pob7zqdsTIc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=W2p3WDgTIBsKf8hhuq/FusCgq+kCKRO1bcVyMm/hnXymmt7W5okNeGAckhvbolq/dlEdzA8xNado+x5DlO8RLSBPee7+O1PN+c+yCJUp6E8QHVjDlY/MGXyYKufAjmyQze5tBR8cWyd3efm7guFRIWqR7Y1tuN+oajh0zvBadYg= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=4QYSSTy0; arc=none smtp.client-ip=156.67.10.101 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=vhs/1zyh476BoXqL8DHijdewSoYAz39LBtzN4oSRRNM=; b=4QYSSTy0d4gCkdZggHH6vN12fX ZhNN0xbhDDeJytUhpvXdT6mQQvk05OmAt97Ej2KzRlIFm3WNYoyvIi7QpN2bMfvLgX1VUdmdkW99U TN1mvSslDisHoHdYCX8mA9bcg3BkwdGBUo2g7MCx1IZ9QvURkR4s0VeMUjRGaPSpwwO8=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xGSNB-00ARHx-Lg; Tue, 13 Oct 2026 04:36:13 +0200 X-Cc: Heiner Kallweit <hkallweit1@gmail.com>, Russell King <linux@armlinux.org.uk>, netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, linux-kernel@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>, Woojung Huh <woojung.huh@microchip.com>, Vladimir Oltean <vladimir.oltean@nxp.com>, Maxime Chevallier <maxime.chevallier@bootlin.com> X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <20261009180551.1234107-4-f@lex.la>