提交 776e726b 编写于 作者: S stephen hemminger 提交者: David S. Miller

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: NStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 1dbba4cb
...@@ -943,7 +943,7 @@ static void netvsc_get_stats64(struct net_device *net, ...@@ -943,7 +943,7 @@ static void netvsc_get_stats64(struct net_device *net,
struct rtnl_link_stats64 *t) struct rtnl_link_stats64 *t)
{ {
struct net_device_context *ndev_ctx = netdev_priv(net); 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; int i;
if (!nvdev) if (!nvdev)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册