mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Aleksei Sviridkin <f@lex.la>
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>
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	[thread overview]
Message-ID: <1b3b1e49-1638-4dce-ac45-300d76e2559d@lunn.ch> (raw)
In-Reply-To: <20261009180551.1234107-4-f@lex.la>

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

  parent reply	other threads:[~2026-10-13  2:36 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-09 18:05 [PATCH net-next v5 0/4] net: phy: make PHY driver unbind safe against attach and use Aleksei Sviridkin
2026-10-09 18:05 ` [PATCH net-next v5 1/4] net: phy: refuse a second attach before touching the PHY Aleksei Sviridkin
2026-10-09 18:05 ` [PATCH net-next v5 2/4] net: phy: put the driver module the attach took Aleksei Sviridkin
2026-10-10 19:07   ` netdev-bot+sashiko
2026-10-13  2:26   ` Andrew Lunn
2026-10-13  2:31   ` Andrew Lunn
2026-10-09 18:05 ` [PATCH net-next v5 3/4] net: phy: serialise attach and detach with PHY driver bind and unbind Aleksei Sviridkin
2026-10-10 19:07   ` netdev-bot+sashiko
2026-10-13  2:36   ` Andrew Lunn [this message]
2026-10-09 18:05 ` [PATCH net-next v5 4/4] net: phy: make an unbind wait for the attached consumer to detach Aleksei Sviridkin
2026-10-10 19:07   ` netdev-bot+sashiko
2026-10-10 19:44   ` Aleksei Sviridkin
2026-10-13  2:37   ` Andrew Lunn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b3b1e49-1638-4dce-ac45-300d76e2559d@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=f@lex.la \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vladimir.oltean@nxp.com \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®