On 1/19/23 17:16, Jakub Kicinski wrote:
On Thu, 19 Jan 2023 11:31:34 +0000 alejandro.lucero-palau@amd.com wrote:
quoted
+ devlink_unregister(efx->devlink);
+ devlink_free(efx->devlink);
Please use the devl_ APIs and take the devl_lock() explicitly.
Once you start adding sub-objects the API with implicit locking
gets racy.
I need more help here.
The explicit locking you refer to, is it for this specific code only?
Also, I can not see all drivers locking/unlocking when doing
devlink_unregister. Those doing it are calling code which invoke
unregister devlink ports, like the NFP and I think ml5x as well.
In this case, no devlink port remains at this point, and no netdev either.
What is the potential race against?