Re: [PATCH net-next 10/13] net: phy: phy_link_topology: Add a helper to retrieve ports
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-01-30 13:41:30
Also in:
lkml
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-01-30 13:41:30
Also in:
lkml
On 28/01/2026 17:10, Romain Gantois wrote:
On Tuesday, 27 January 2026 14:41:58 CET Maxime Chevallier wrote:quoted
In order to allow netlink access to phy_ports, let's add a helper to retrieve them. When handling a port coming from phy_link_topology, the caller must hold rtnl until it's done with it.Why not use rtnl-specific lockdep annotations to make this more explicit?
While this makes sure the call-site holds the lock as it should, it doesn't guarantee the caller won't release it too early. Doesn't hurt to add it though :) Maxime
Thanks,