Re: [PATCH net-next 10/13] net: phy: phy_link_topology: Add a helper to retrieve ports

Maxime Chevallier
2026-01-30T13:41:30Z

On 28/01/2026 17:10, Romain Gantois wrote:
> On Tuesday, 27 January 2026 14:41:58 CET Maxime Chevallier wrote:
>> 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,
>