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

[Xen-changelog] [xen-unstable] acm: Cleaner use of copy_from_guest().



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1186650239 -3600
# Node ID 918e04a982b8c8ccb9a548896b86706ee5a4f128
# Parent  ae3b1331ce19ce6bc985e8ce56084a934cf65e6b
acm: Cleaner use of copy_from_guest().
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 xen/acm/acm_policy.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff -r ae3b1331ce19 -r 918e04a982b8 xen/acm/acm_policy.c
--- a/xen/acm/acm_policy.c      Thu Aug 09 10:01:17 2007 +0100
+++ b/xen/acm/acm_policy.c      Thu Aug 09 10:03:59 2007 +0100
@@ -710,12 +710,12 @@ acm_change_policy(struct acm_change_poli
         goto acm_chg_policy_exit;
     }
 
-    if ( copy_from_guest((u8 *)dels.array,
+    if ( copy_from_guest(dels.array,
                          chgpolicy->del_array,
-                         chgpolicy->delarray_size) ||
-         copy_from_guest((u8 *)ssidmap.array,
+                         dels.num_items) ||
+         copy_from_guest(ssidmap.array,
                          chgpolicy->chg_array,
-                         chgpolicy->chgarray_size) ||
+                         ssidmap.num_items) ||
          copy_from_guest(binpolicy,
                          chgpolicy->policy_pushcache,
                          chgpolicy->policy_pushcache_size ))
@@ -844,9 +844,9 @@ acm_relabel_domains(struct acm_relabel_d
         memset(errors.array, 0x0, sizeof(uint32_t) * errors.num_items);
     }
 
-    if ( copy_from_guest((u8 *)relabels.array,
+    if ( copy_from_guest(relabels.array,
                          relabel->relabel_map,
-                         relabel->relabel_map_size) )
+                         relabels.num_items) )
     {
         rc = -EFAULT;
         goto acm_relabel_doms_exit;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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