summaryrefslogtreecommitdiffstats
path: root/drivers/net/hyperv/hyperv_net.h
diff options
context:
space:
mode:
authorstephen hemminger2017-07-19 20:53:18 +0200
committerDavid S. Miller2017-07-20 07:20:05 +0200
commit35fbbccfb417385c1c8cc6f799154ea1ebdc22ef (patch)
treedf956c396785926a4d78f4075fdfbd004e93f3a0 /drivers/net/hyperv/hyperv_net.h
parentnetvsc: need rcu_derefence when accessing internal device info (diff)
downloadkernel-qcow2-linux-35fbbccfb417385c1c8cc6f799154ea1ebdc22ef.tar.gz
kernel-qcow2-linux-35fbbccfb417385c1c8cc6f799154ea1ebdc22ef.tar.xz
kernel-qcow2-linux-35fbbccfb417385c1c8cc6f799154ea1ebdc22ef.zip
netvsc: save pointer to parent netvsc_device in channel table
Keep back pointer in the per-channel data structure to avoid any possible RCU related issues when napi poll is called but netvsc_device is in RCU limbo. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/hyperv/hyperv_net.h')
-rw-r--r--drivers/net/hyperv/hyperv_net.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/hyperv/hyperv_net.h b/drivers/net/hyperv/hyperv_net.h
index 0054b6929f6e..d13572879e7e 100644
--- a/drivers/net/hyperv/hyperv_net.h
+++ b/drivers/net/hyperv/hyperv_net.h
@@ -727,6 +727,7 @@ struct net_device_context {
/* Per channel data */
struct netvsc_channel {
struct vmbus_channel *channel;
+ struct netvsc_device *net_device;
const struct vmpacket_descriptor *desc;
struct napi_struct napi;
struct multi_send_data msd;