summaryrefslogtreecommitdiffstats
path: root/include/linux/hyperv.h
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2017-03-04 18:13:57 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-16 16:42:00 +0900
commit8200f2085abe7f29a016381f3122000cc7b2a760 (patch)
tree63b48dc913ec3f3726ec3eb79cafc56ecdcb2822 /include/linux/hyperv.h
parentc6240cacdb2c3cb56a21fb3ea0c105154ab87a2a (diff)
downloadop-kernel-dev-8200f2085abe7f29a016381f3122000cc7b2a760.zip
op-kernel-dev-8200f2085abe7f29a016381f3122000cc7b2a760.tar.gz
vmbus: use rcu for per-cpu channel list
The per-cpu channel list is now referred to in the interrupt routine. This is mostly safe since the host will not normally generate an interrupt when channel is being deleted but if it did then there would be a use after free problem. To solve, this use RCU protection on ther per-cpu list. Fixes: 631e63a9f346 ("vmbus: change to per channel tasklet") Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/hyperv.h')
-rw-r--r--include/linux/hyperv.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
index 62bbf3c..c4c7ae9 100644
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -845,6 +845,13 @@ struct vmbus_channel {
* link up channels based on their CPU affinity.
*/
struct list_head percpu_list;
+
+ /*
+ * Defer freeing channel until after all cpu's have
+ * gone through grace period.
+ */
+ struct rcu_head rcu;
+
/*
* For performance critical channels (storage, networking
* etc,), Hyper-V has a mechanism to enhance the throughput
OpenPOWER on IntegriCloud