Re: [PATCH net-next v9 12/13] net: ethtool: tsinfo: Add support for hwtstamp provider and get/set hwtstamp config

From
Jakub Kicinski <kuba@kernel.org>
Date
2024-03-05 18:04:29
Also in
linux-doc, lkml
Reply to
Köry Maincent, 2024-03-05
On Tue, 5 Mar 2024 17:52:53 +0100 Köry Maincent wrote:
quoted
quoted
+		/* Does the hwtstamp supported in the netdev topology */
+		if (mod) {
+			hwtstamp.ptp = ptp_clock_get_by_index(phc_index);    
This just returns a pointer without any refcounting, right?
What guarantees the ptp object doesn't disappear?  
Could the ptp object disappears within rtnlock?
I believe so, yes.
Maybe I should add refcounting.
Thread (33 messages) 33 messages, 4 authors, last reply 2024-03-05
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