Re: [PATCH net-next V6] ptp: fix corrupted list in ptp_open
From: Richard Cochran
Date: Sun Nov 05 2023 - 09:03:49 EST
On Sun, Nov 05, 2023 at 05:36:41AM -0800, Richard Cochran wrote:
> > @@ -44,6 +44,7 @@ struct ptp_clock {
> > struct pps_device *pps_source;
> > long dialed_frequency; /* remembers the frequency adjustment */
> > struct list_head tsevqs; /* timestamp fifo list */
> > + spinlock_t tsevqs_lock; /* one process at a time writing the timestamp fifo list*/
>
> Please change this comment to "protects tsevqs from concurrent access"
And please don't forget to take the spin lock around
list_for_each_entry() in ptp_clock_event().
Thanks,
Richard