Subject: Re: [PATCH net] net: fec: avoid lock evasion when reading pps_enable

From: Simon Horman <[email-masked]>
Date: Mon, 13 May 2024 20:56:49 +0100

On Mon, May 13, 2024 at 08:54:59PM +0100, Simon Horman wrote:
> On Mon, May 13, 2024 at 09:51:26AM +0800, Wei Fang wrote:
> > The assignment of pps_enable is protected by tmreg_lock, but the read
> > operation of pps_enable is not. So the Coverity tool reports a lock
> > evasion warning which may cause data race to occur when running in a
> > multithread environment. Although this issue is almost impossible to
> > occur, we'd better fix it, at least it seems more logically reasonable,
> > and it also prevents Coverity from continuing to issue warnings.
> > 
> > Fixes: 278d24047891 ("net: fec: ptp: Enable PPS output based on ptp clock")
> > Signed-off-by: Wei Fang <[email-masked]>
> 
> Reviewed-by: Simon Horman <[email-masked]>

Sorry, I convinced myself this is correct.
But I now see that questions have been raised by others.
So please ignore the above.