netvsc: add rcu_read locking to netvsc callback
authorstephen hemminger <stephen@networkplumber.org>
Wed, 11 Jan 2017 17:16:32 +0000 (09:16 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Feb 2017 08:47:08 +0000 (09:47 +0100)
commit5b3df4401064ef94cddac976aba1474a7050fa5e
treedbb347ccc3ff3c55b338f465a95e9713f562d78a
parenta37f2311e63c8989675e297cdc9300cbec6e2217
netvsc: add rcu_read locking to netvsc callback

[ Upstream commit 0719e72ccb801829a3d735d187ca8417f0930459 ]

The receive callback (in tasklet context) is using RCU to get reference
to associated VF network device but this is not safe. RCU read lock
needs to be held. Found by running with full lockdep debugging
enabled.

Fixes: f207c10d9823 ("hv_netvsc: use RCU to protect vf_netdev")
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/hyperv/netvsc_drv.c