[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250325025058.067517d1@kernel.org>
Date: Tue, 25 Mar 2025 02:50:58 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Mina Almasry <almasrymina@...gle.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org, sdf@...ichev.me
Subject: Re: [PATCH net-next v2 07/11] net: protect rxq->mp_params with the
instance lock
On Mon, 24 Mar 2025 22:34:43 -0700 Mina Almasry wrote:
> > @@ -11957,9 +11957,9 @@ void unregister_netdevice_many_notify(struct list_head *head,
> > dev_tcx_uninstall(dev);
> > netdev_lock_ops(dev);
> > dev_xdp_uninstall(dev);
> > + dev_memory_provider_uninstall(dev);
> > netdev_unlock_ops(dev);
> > bpf_dev_bound_netdev_unregister(dev);
> > - dev_memory_provider_uninstall(dev);
>
> So initially I thought this may be wrong because netdev_lock_ops()
> only locks if there are queue_mgmt_ops, but access to mp_params should
> be locked anyway. But I guess you're relying on the fact that if the
> device doesn't support queue_mgmt_ops memory providers don't work
> anyway.
Right, my expectation is that they must be NULL if device is not
ops-locked. Not sure if that's what textbooks would consider "correct"
but I think KCSAN will not complain :)
Powered by blists - more mailing lists