|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen staging-4.21] arinc653: overwrite entire .dom_handle[] for Dom0 slots
commit d174a86aaf3f019307f52a81df5e1fd32de44e86
Author: Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Mon Apr 20 12:19:52 2026 +0200
Commit: Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Mon Apr 20 12:19:52 2026 +0200
arinc653: overwrite entire .dom_handle[] for Dom0 slots
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() and arinc653_sched_set() may
have clobbered entries. 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@xxxxxxxx>
Reviewed-by: Juergen Gross <jgross@xxxxxxxx>
Reviewed-by: Stewart Hildebrand <stewart@xxxxxxx>
master commit: 2a0ee29f5e6441b3c977ae8862842fd7c4da79d3
master date: 2026-03-26 10:47:08 +0100
---
xen/common/sched/arinc653.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/xen/common/sched/arinc653.c b/xen/common/sched/arinc653.c
index 8a4f4259d8..bde15eb7e1 100644
--- a/xen/common/sched/arinc653.c
+++ b/xen/common/sched/arinc653.c
@@ -420,7 +420,9 @@ a653sched_alloc_udata(const struct scheduler *ops, struct
sched_unit *unit,
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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging-4.21
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |