Thread (32 messages) 32 messages, 4 authors, 2026-02-11

Re: [PATCH net-next V7 07/14] devlink: Add parent dev to devlink API

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-02-11 16:57:40
Also in: linux-doc, linux-rdma, lkml

On Wed, 11 Feb 2026 16:28:14 +0000 Cosmin Ratiu wrote:
quoted
quoted
+		/* Drop the parent devlink lock but don't release
the reference.
+		 * This will keep it alive until the end of the
request.
+		 */  
To be clear -- devlink instances do not behave like netdev instances.
netdev instances prevent unregistration of the netdev.
devlink refs are normal refs, they just keep the memory around.
If memory serves me..  
If no reference is held, a concurrent user op could release the parent
devlink instance altogether, and free its memory, that's the reason for
keeping a ref alive for the duration of this request.
I suppose my comment was more about using the word "alive" 
in networking context. I associate "alive" with registered. 
See dev_isalive(). Here you're just keeping the object
from being freed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help