[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Y+6qlbv1uQ3obZ+N@hoboy.vegasvil.org>
Date: Thu, 16 Feb 2023 14:13:41 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Íñigo Huguet <ihuguet@...hat.com>
Cc: yangbo.lu@....com, mlichvar@...hat.com,
gerhard@...leder-embedded.com, habetsm.xilinx@...il.com,
ecree.xilinx@...il.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, netdev@...r.kernel.org,
Yalin Li <yalli@...hat.com>
Subject: Re: [PATCH net] ptp: vclock: use mutex to fix "sleep on atomic" bug
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:
> > @@ -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
Powered by blists - more mailing lists