mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-24 10:11:26 +03:00
ether_get_tx_ts, pdata->tx_ts_ref_cnt is an atomic variable that is used as a mutex in this function and should not return 0 if the function fails to acquire the mutex. The workqueue is scheduled when the return value of the judgment function is <0. If one CPU core execution softirq is running in ether_get_tx_ts function and another CPU core softirq also calls ether_get_tx_ts function to get hardware timestamp, then the acquisition of mutex fails and return 0. After returning 0, the workqueue is not scheduled. The timestamp cannot be obtained in time. So ether_get_tx_ts should returns -1 on failure to acquire the mutex. Bug 4150416 Change-Id: Icffd409b349d8bb8dbf5a483124b3bd3d7ef6cc8 Signed-off-by: Bhadram Varka <vbhadram@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2934350 Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>