]> xenbits.xensource.com Git - people/jgross/xen.git/commitdiff
xen/domain: Reposition config copying in domain_create()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Jan 2021 14:50:57 +0000 (14:50 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 18 Jan 2021 16:23:03 +0000 (16:23 +0000)
This is cleanup for two pending series which will copy more data than just
flags from config.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/common/domain.c

index d151be3f36dd79755e9d1b048b0f82cdae2ab585..164c9d14e9d43dc09e12640a4dd86e57558b0c38 100644 (file)
@@ -421,14 +421,15 @@ struct domain *domain_create(domid_t domid,
     if ( (d = alloc_domain_struct()) == NULL )
         return ERR_PTR(-ENOMEM);
 
-    d->options = config ? config->flags : 0;
-
     /* Sort out our idea of is_system_domain(). */
     d->domain_id = domid;
 
     /* Debug sanity. */
     ASSERT(is_system_domain(d) ? config == NULL : config != NULL);
 
+    if ( config )
+        d->options = config->flags;
+
     /* Sort out our idea of is_control_domain(). */
     d->is_privileged = is_priv;