Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbd4c7e7 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller
Browse files

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: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8397ed36
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;