[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d4a5f340-157e-3830-1efa-420408ee1b33@intel.com>
Date: Mon, 19 Dec 2022 14:16:01 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <jiri@...nulli.us>, <leon@...nel.org>, <netdev@...r.kernel.org>
Subject: Re: [RFC net-next 00/10] devlink: remove the wait-for-references on
unregister
On 12/19/2022 2:10 PM, Jakub Kicinski wrote:
> 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]
> https://lore.kernel.org/all/20221122121048.776643-1-yangyingliang@huawei.com/
Great. I also think its better to allow some of the sub objects to be
setup either before or after registering, as some things might be
dynamic. This series lets us get there safely which is good.
Powered by blists - more mailing lists