Re: [RFC net-next 00/10] devlink: remove the wait-for-references on unregister

Jakub Kicinski
2022-12-19T22:11:33Z

On Mon, 19 Dec 2022 09:38:09 -0800 Jacob Keller wrote:
> On 12/16/2022 5:19 PM, Jakub Kicinski wrote:
> > This set is on top of the previous RFC.
> >
> > Move the registration and unregistration of the devlink instances
> > under their instance locks. Don't perform the netdev-style wait
> > for all references when unregistering the instance.
>
> Could you explain the reasoning/benefits here? I'm sure some of this is
> explained in each commit message as well but it would help to understand
> the overall series.

Fair point, I'll add this:

Yang Yingliang reported [1] a use-after-free in devlink because netdev
paths are able to acquire a reference on the devlink instances before
they are registered.

[1]