Thread (52 messages) 52 messages, 7 authors, 2023-01-24

Re: [PATCH net-next 1/7] sfc: add devlink support for ef100

From: Lucero Palau, Alejandro <hidden>
Date: 2023-01-19 17:52:50

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?

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help