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

[Xen-changelog] Fix exit path from DOM0_CREATEDOMAIN, which I broke earlier



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID e8b48f3a2843e79680147926fbe4ba94cce68589
# Parent  ce4b630067bb3544bdf3df2e84a451048e97e559

Fix exit path from DOM0_CREATEDOMAIN, which I broke earlier
today.

diff -r ce4b630067bb -r e8b48f3a2843 xen/common/dom0_ops.c
--- a/xen/common/dom0_ops.c     Fri Jul 15 08:50:48 2005
+++ b/xen/common/dom0_ops.c     Fri Jul 15 09:09:57 2005
@@ -215,14 +215,16 @@
                 pro = i;
 
         ret = -ENOMEM;
-        if ( (d = do_createdomain(dom, pro)) != NULL )
-            ret = 0;
-        
+        if ( (d = do_createdomain(dom, pro)) == NULL )
+            goto alloc_out;
+
+        ret = 0;
+
+        op->u.createdomain.domain = d->domain_id;
+        copy_to_user(u_dom0_op, op, sizeof(*op));
+
     alloc_out:
         spin_unlock(&alloc_lock);
-
-        op->u.createdomain.domain = d->domain_id;
-        copy_to_user(u_dom0_op, op, sizeof(*op));
     }
     break;
 

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