We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3f8f2e9 commit 4c61d80Copy full SHA for 4c61d80
net/ethtool/common.c
@@ -870,7 +870,8 @@ int __ethtool_get_ts_info(struct net_device *dev,
870
{
871
struct hwtstamp_provider *hwprov;
872
873
- hwprov = rtnl_dereference(dev->hwprov);
+ rcu_read_lock();
874
+ hwprov = rcu_dereference(dev->hwprov);
875
/* No provider specified, use default behavior */
876
if (!hwprov) {
877
const struct ethtool_ops *ops = dev->ethtool_ops;
@@ -887,9 +888,11 @@ int __ethtool_get_ts_info(struct net_device *dev,
887
888
info->so_timestamping |= SOF_TIMESTAMPING_RX_SOFTWARE |
889
SOF_TIMESTAMPING_SOFTWARE;
890
891
+ rcu_read_unlock();
892
return err;
893
}
894
895
896
return ethtool_get_ts_info_by_phc(dev, info, &hwprov->desc);
897
898
0 commit comments