Thread (6 messages) 6 messages, 5 authors, 2023-02-03

Re: PTP vclock: BUG: scheduling while atomic

From: Richard Cochran <richardcochran@gmail.com>
Date: 2023-02-03 00:10:32

On Thu, Feb 02, 2023 at 05:33:15PM +0100, Miroslav Lichvar wrote:
On Thu, Feb 02, 2023 at 05:02:07PM +0100, Íñigo Huguet wrote:
quoted
Our QA team was testing PTP vclocks, and they've found this error with sfc NIC/driver:
  BUG: scheduling while atomic: ptp5/25223/0x00000002

The reason seems to be that vclocks disable interrupts with `spin_lock_irqsave` in
`ptp_vclock_gettime`, and then read the timecounter, which in turns ends calling to
the driver's `gettime64` callback.
The same issue was observed with the ice driver:
https://lists.osuosl.org/pipermail/intel-wired-lan/Week-of-Mon-20221107/030633.html

I tried to fix it generally in the vclock support, but was not
successful. There was a hint it would be fixed in the driver. I'm not
sure what is the best approach here.
Can ptp_vclock_gettime use a mutex instead?

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