Skip to content
Commit 4f11834e authored by Wei Fang's avatar Wei Fang Committed by Greg Kroah-Hartman
Browse files

net: fec: avoid lock evasion when reading pps_enable

[ Upstream commit 3b1c92f8 ]

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: 278d2404

 ("net: fec: ptp: Enable PPS output based on ptp clock")
Signed-off-by: default avatarWei Fang <wei.fang@nxp.com>
Link: https://lore.kernel.org/r/20240521023800.17102-1-wei.fang@nxp.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent eeae2526
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment