Thread (5 messages) flat view 5 messages, 4 authors, 2025-06-21

Re: [PATCH net-next RFC] net: Throw ASSERT_RTNL into phy_detach

From: Andrew Lunn <andrew@lunn.ch>
Date: 2025-06-21 07:49:08
Also in: linux-renesas-soc, linux-usb, lkml

On Fri, Jun 20, 2025 at 04:33:27PM +0200, Kory Maincent wrote:
phy_detach needs the rtnl lock to be held. It should have been added before
to avoid this massive change among lots of net drivers but there was no
clear evidence of such needs at that time. This imply a lock change in
this API. Add phy_detach_rtnl, phy_diconnect_rtnl, phylink_connect_phy_rtnl
and phylink_fwnode_phy_connect_rtnl helpers to take the lock before calling
their respective function.
Did you count how many instances don't need to take the lock, because
it is already held? I'm just wondering if the opposite patch would be
smaller, making phy_detach() take RTNL, and add a new function which
does not.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help