Re: [RFC PATCH net-next 1/2] devlink: Hold a reference on parent device

From
Jakub Kicinski <kuba@kernel.org>
Date
2023-06-20 17:43:52
Reply to
Ido Schimmel, 2023-06-20
On Tue, 20 Jun 2023 10:05:23 +0300 Ido Schimmel wrote:
On Tue, Jun 20, 2023 at 08:23:26AM +0200, Jiri Pirko wrote:
quoted
Mon, Jun 19, 2023 at 02:50:14PM CEST, idosch@nvidia.com wrote:  
 [...]  
quoted
Reviewed-by: Jiri Pirko <redacted>  
Thanks, but I was hoping to get feedback on how to solve the problem
mentioned in the commit message :p
Do we need to hold the reference on the device until release?
I think you can release it in devlink_free().
The only valid fields for an unregistered devlink instance are:
 - lock
 - refcount
 - index

And obviously unregistered devices can't be reloaded.
Thread (14 messages) 14 messages, 3 authors, last reply 2023-06-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help