diff options
author | stephen hemminger <stephen@networkplumber.org> | 2017-06-08 01:53:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-08 18:45:48 +0300 |
commit | fbd4c7e768f1719bea340e40148800279d230922 (patch) | |
tree | 88aa286870d0f69cd7f269e7c866fc289897e38e /drivers | |
parent | 8397ed36b7c585f8d3e06c431f4137309124f78f (diff) | |
download | linux-fbd4c7e768f1719bea340e40148800279d230922.tar.xz |
netvsc: fix rcu dereference warning from ethtool
The ethtool info command calls the netvsc get_sset_count with RTNL
but not with RCU. Which causes warning:
drivers/net/hyperv/netvsc_drv.c:1010 suspicious rcu_dereference_check() usage!
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/hyperv/netvsc_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 4421a6d00375..d93e4da25fd2 100644 --- a/drivers/net/hyperv/netvsc_drv.c +++ b/drivers/net/hyperv/netvsc_drv.c @@ -1028,7 +1028,7 @@ static const struct { static int netvsc_get_sset_count(struct net_device *dev, int string_set) { struct net_device_context *ndc = netdev_priv(dev); - struct netvsc_device *nvdev = rcu_dereference(ndc->nvdev); + struct netvsc_device *nvdev = rtnl_dereference(ndc->nvdev); if (!nvdev) return -ENODEV; |