[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH v4 14/14] xsm, argo: notify: don't describe rings that cannot be sent to



Signed-off-by: Christopher Clark <christopher.clark6@xxxxxxxxxxxxxx>
Acked-by: Daniel De Graaf <dgdegra@xxxxxxxxxxxxx>
---
v3 #10 Roger: drop out label, use return -EFAULT in fill_ring_data
v3: Add Daniel's Acked-by

 xen/common/argo.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/xen/common/argo.c b/xen/common/argo.c
index 23b61bf..ced8d47 100644
--- a/xen/common/argo.c
+++ b/xen/common/argo.c
@@ -1261,6 +1261,7 @@ fill_ring_data(const struct domain *currd,
     xen_argo_ring_data_ent_t ent;
     struct domain *dst_d;
     struct argo_ring_info *ring_info;
+    int ret;
 
     ASSERT(currd == current->domain);
     ASSERT(LOCKING_Read_L1);
@@ -1278,6 +1279,17 @@ fill_ring_data(const struct domain *currd,
     {
         if ( dst_d->argo )
         {
+            /*
+             * Don't supply information about rings that a guest is not
+             * allowed to send to.
+             */
+            ret = xsm_argo_send(currd, dst_d);
+            if ( ret )
+            {
+                put_domain(dst_d);
+                return ret;
+            }
+
             read_lock(&dst_d->argo->rings_L2_rwlock);
 
             ring_info = find_ring_info_by_match(dst_d, ent.ring.aport,
-- 
2.7.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.