]> git.baikalelectronics.ru Git - kernel.git/commit
ice: add lock around Tx timestamp tracker flush
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 24 Aug 2021 00:01:48 +0000 (17:01 -0700)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 27 Aug 2021 16:14:49 +0000 (09:14 -0700)
commitff4922a23e96c7caa47b1da7cee1d957cef1d619
tree765dcc953abccec6ddea70105dfa4840559791bc
parent97a98508bbf402386cc23818673a662bcdb50cd4
ice: add lock around Tx timestamp tracker flush

The driver didn't take the lock while flushing the Tx tracker, which
could cause a race where one thread is trying to read timestamps out
while another thread is trying to read the tracker to check the
timestamps.

Avoid this by ensuring that flushing is locked against read accesses.

Fixes: af3f04b49ed3 ("ice: enable transmit timestamps for E810 devices")
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_ptp.c