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

[Xen-changelog] [xen-unstable] acm: Changes to files missed in previous cleanup patch.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1177447800 -3600
# Node ID b43bd71ee65bf40b904ff7b786209cbee4a5bc5a
# Parent  58e98e80337838b6c29e339bda8e75cb8422f90b
acm: Changes to files missed in previous cleanup patch.
Signed-off-by: Stefan Berger <stefanb@xxxxxxxxxx>
---
 xen/acm/acm_core.c         |   20 ++++++++++++++------
 xen/include/acm/acm_core.h |    1 +
 2 files changed, 15 insertions(+), 6 deletions(-)

diff -r 58e98e803378 -r b43bd71ee65b xen/acm/acm_core.c
--- a/xen/acm/acm_core.c        Tue Apr 24 21:48:09 2007 +0100
+++ b/xen/acm/acm_core.c        Tue Apr 24 21:50:00 2007 +0100
@@ -312,18 +312,28 @@ int
 int
 acm_init_domain_ssid(domid_t id, ssidref_t ssidref)
 {
-    struct acm_ssid_domain *ssid;
     struct domain *subj = rcu_lock_domain_by_id(id);
-    int ret1, ret2;
+    int ret;
  
     if (subj == NULL)
     {
         printk("%s: ACM_NULL_POINTER ERROR (id=%x).\n", __func__, id);
         return ACM_NULL_POINTER_ERROR;
     }
+
+    ret = acm_init_domain_ssid_new(subj, ssidref);
+
+    rcu_unlock_domain(subj);
+
+    return ret;
+}
+
+int acm_init_domain_ssid_new(struct domain *subj, ssidref_t ssidref)
+{
+    struct acm_ssid_domain *ssid;
+    int ret1, ret2;
     if ((ssid = xmalloc(struct acm_ssid_domain)) == NULL)
     {
-        rcu_unlock_domain(subj);
         return ACM_INIT_SSID_ERROR;
     }
 
@@ -355,12 +365,10 @@ acm_init_domain_ssid(domid_t id, ssidref
         printk("%s: ERROR instantiating individual ssids for domain 0x%02x.\n",
                __func__, subj->domain_id);
         acm_free_domain_ssid(ssid);
-        rcu_unlock_domain(subj);
         return ACM_INIT_SSID_ERROR;
     }
     printkd("%s: assigned domain %x the ssidref=%x.\n",
-           __func__, id, ssid->ssidref);
-    rcu_unlock_domain(subj);
+           __func__, subj->domain_id, ssid->ssidref);
     return ACM_OK;
 }
 
diff -r 58e98e803378 -r b43bd71ee65b xen/include/acm/acm_core.h
--- a/xen/include/acm/acm_core.h        Tue Apr 24 21:48:09 2007 +0100
+++ b/xen/include/acm/acm_core.h        Tue Apr 24 21:50:00 2007 +0100
@@ -120,6 +120,7 @@ struct ste_ssid {
 
 /* protos */
 int acm_init_domain_ssid(domid_t id, ssidref_t ssidref);
+int acm_init_domain_ssid_new(struct domain *, ssidref_t ssidref);
 void acm_free_domain_ssid(struct acm_ssid_domain *ssid);
 int acm_init_binary_policy(u32 policy_code);
 int acm_set_policy(XEN_GUEST_HANDLE(void) buf, u32 buf_size);

_______________________________________________
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®.