Thread (3 messages) 3 messages, 2 authors, 2023-02-16

Re: [PATCH net] ptp: vclock: use mutex to fix "sleep on atomic" bug

From: Richard Cochran <richardcochran@gmail.com>
Date: 2023-02-16 22:13:49

On Thu, Feb 16, 2023 at 02:05:56PM -0800, Richard Cochran wrote:
On Thu, Feb 16, 2023 at 03:30:51PM +0100, Íñigo Huguet wrote:
quoted
@@ -281,9 +280,10 @@ ktime_t ptp_convert_timestamp(const ktime_t *hwtstamp, int vclock_index)
 		if (vclock->clock->index != vclock_index)
 			continue;
 
-		spin_lock_irqsave(&vclock->lock, flags);
+		if (mutex_lock_interruptible(&vclock->lock) < 0)
+			break;
This is the only one that I'm not sure about.  The others are all
called from user context.  Clean lockdep run would help.
Oh never mind.  mutex code would scream if called from wrong context.

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