Re: [PATCH net-next v1 3/4] net: add granular lock for the netdev netlink socket

Jakub Kicinski
2025-03-07T23:33:26Z

On Fri, 7 Mar 2025 11:35:23 -0800 Stanislav Fomichev wrote:
> On 03/07, Jakub Kicinski wrote:
> > On Fri, 7 Mar 2025 07:57:24 -0800 Stanislav Fomichev wrote:
> > > As we move away from rtnl_lock for queue ops, introduce
> > > per-netdev_nl_sock lock.
> >
> > What is it protecting?
>
> The 'bindings' field of the netlink socket:
>
> struct netdev_nl_sock {
> struct mutex lock;
> struct list_head bindings; <<<
> };
>
> I'm assuming it's totally valid to have several bindings per socket?

Totally, sorry, I got confused by there being two xarrays.
Lock on the socket state makes sense.