summaryrefslogtreecommitdiff
path: root/drivers/net/hyperv
diff options
context:
space:
mode:
authorstephen hemminger <stephen@networkplumber.org>2017-04-15 00:42:57 +0300
committerDavid S. Miller <davem@davemloft.net>2017-04-17 22:12:33 +0300
commit776e726bfb3493f71bb11759f7a60f1b0f6dd2d2 (patch)
tree81ee369b46ff8e4eda9bd697b7e01d1c8fd27fb8 /drivers/net/hyperv
parent1dbba4cb8df73844ea0d7c1fd11e1ea35f1670b7 (diff)
downloadlinux-776e726bfb3493f71bb11759f7a60f1b0f6dd2d2.tar.xz
netvsc: fix RCU warning in get_stats
The statistics functionis called with RTNL held during probe but with RCU held during access from /proc and elsewhere. This is safe so update the lockdep annotation. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv')
-rw-r--r--drivers/net/hyperv/netvsc_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index 51fa90365348..97d0b5875cd5 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -943,7 +943,7 @@ static void netvsc_get_stats64(struct net_device *net,
struct rtnl_link_stats64 *t)
{
struct net_device_context *ndev_ctx = netdev_priv(net);
- struct netvsc_device *nvdev = rcu_dereference(ndev_ctx->nvdev);
+ struct netvsc_device *nvdev = rcu_dereference_rtnl(ndev_ctx->nvdev);
int i;
if (!nvdev)