When that code still lived in a653sched_init(), it was redundant with the
earlier memset() / xzalloc(). Once moved, the full structure field needs
setting, as dom_handle_cmp() uses memcmp(). Rather than implying the
handle to be all zero, copy the handle out of the domain structure.
Fixes: 9f0c658baedc ("arinc: add cpu-pool support to scheduler")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
---
v2: Copy handle rather than clearing it.
--- a/xen/common/sched/arinc653.c
+++ b/xen/common/sched/arinc653.c
@@ -420,7 +420,9 @@ a653sched_alloc_udata(const struct sched
if ( entry < ARINC653_MAX_DOMAINS_PER_SCHEDULE )
{
- sched_priv->schedule[entry].dom_handle[0] = '\0';
+ memcpy(sched_priv->schedule[entry].dom_handle,
+ unit->domain->handle,
+ sizeof(sched_priv->schedule->dom_handle));
sched_priv->schedule[entry].unit_id = unit->unit_id;
sched_priv->schedule[entry].runtime = DEFAULT_TIMESLICE;
sched_priv->schedule[entry].unit = unit;