ia64/xen-unstable

changeset 5789:e8b48f3a2843

Fix exit path from DOM0_CREATEDOMAIN, which I broke earlier
today.
author kaf24@firebug.cl.cam.ac.uk
date Fri Jul 15 09:09:57 2005 +0000 (2005-07-15)
parents ce4b630067bb
children ebfde26a769a
files xen/common/dom0_ops.c
line diff
     1.1 --- a/xen/common/dom0_ops.c	Fri Jul 15 08:50:48 2005 +0000
     1.2 +++ b/xen/common/dom0_ops.c	Fri Jul 15 09:09:57 2005 +0000
     1.3 @@ -215,14 +215,16 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     1.4                  pro = i;
     1.5  
     1.6          ret = -ENOMEM;
     1.7 -        if ( (d = do_createdomain(dom, pro)) != NULL )
     1.8 -            ret = 0;
     1.9 -        
    1.10 -    alloc_out:
    1.11 -        spin_unlock(&alloc_lock);
    1.12 +        if ( (d = do_createdomain(dom, pro)) == NULL )
    1.13 +            goto alloc_out;
    1.14 +
    1.15 +        ret = 0;
    1.16  
    1.17          op->u.createdomain.domain = d->domain_id;
    1.18          copy_to_user(u_dom0_op, op, sizeof(*op));
    1.19 +
    1.20 +    alloc_out:
    1.21 +        spin_unlock(&alloc_lock);
    1.22      }
    1.23      break;
    1.24