xen/domain: Initialise the domain handle before inserting into the domlist

As soon as the the domain is in the domlist, it can be queried via various
means, ahead of being fully constructed.  Ensure it has the toolstack-given
UUID prior to becoming visible.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Andrew Cooper committed 2025-03-10 15:05:09 +00:00
1 parent 12f1af2e8f
commit 1ce968d960
1 file changed
+2 -1
+2 -1
View File
@@ -901,6 +901,8 @@ struct domain *domain_create(domid_t domid,
*/
ASSERT(config);
memcpy(d->handle, config->handle, sizeof(d->handle));
#ifdef CONFIG_HAS_PIRQ
if ( !is_hardware_domain(d) )
d->nr_pirqs = nr_static_irqs + extra_domU_irqs;
@@ -962,7 +964,6 @@ struct domain *domain_create(domid_t domid,
domlist_insert(d);
domain_changed_state(d);
memcpy(d->handle, config->handle, sizeof(d->handle));
return d;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.