From: stephen hemminger Date: Fri, 14 Apr 2017 21:42:57 +0000 (-0700) Subject: netvsc: fix RCU warning in get_stats X-Git-Tag: v4.12-rc1~129^2~173 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=776e726bfb3493f71bb11759f7a60f1b0f6dd2d2;p=platform%2Fkernel%2Flinux-exynos.git 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 Signed-off-by: David S. Miller --- diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c index 51fa903..97d0b58 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)