Re: [PATCH net-next 1/2] netvsc: fix RCU warning in get_stats

2017-04-17 Thread David Miller

Both patches applied but you may want to use more consistent
Subject line subsystem prefixes in the future.


[PATCH net-next 1/2] netvsc: fix RCU warning in get_stats

2017-04-14 Thread Stephen Hemminger
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 
---
 drivers/net/hyperv/netvsc_drv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc_drv.c b/drivers/net/hyperv/netvsc_drv.c
index f24c2891dd0c..76489a06ef3b 100644
--- a/drivers/net/hyperv/netvsc_drv.c
+++ b/drivers/net/hyperv/netvsc_drv.c
@@ -897,7 +897,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)
-- 
2.11.0