Skip to contentSkip to conversation

cobalt/ipipe: Perform host_pid initialization

PATCH New Jan Kiszka 1 participant 1 message Apr 23

lore
Share & tools
lore

Jan Kiszka

author Applied
#0 lore raw

PATCH 1/1 cobalt/ipipe: Perform host_pid initialization

From: Jan Kiszka <[email protected]>

Add the requires initialization of host_pid to the ipipe versions of pipeline_init_*_tcb. Those were missing in the original patch as it was developed against the dovetail-only head.

Fixes 04bdfae691ab (backport of "cobalt/thread: Keep host task PID in xnthread struct as well")

---

I've picked that upstream commit also for 3.2 - and ran into this gab. Pipeline green now again, but I wanted to share for transparency.

 kernel/cobalt/ipipe/sched.c | 2 ++
 1 file changed, 2 insertions(+)
kernel/cobalt/ipipe/sched.c +2 -0
index 3104e50156..8ce1ccf16c 100644
@@ -121,6 +121,7 @@ void pipeline_init_shadow_tcb(struct xnthread *thread)
 	tcb->core.user_fpu_owner = p;
 #endif /* CONFIG_XENO_ARCH_FPU */
 	xnarch_init_shadow_tcb(thread);
+	thread->host_pid = task_pid_nr(xnthread_host_task(thread));
 
 	trace_cobalt_shadow_map(thread);
 }
@@ -135,6 +136,7 @@ void pipeline_init_root_tcb(struct xnthread *thread)
 	tcb->core.mm = p->mm;
 	tcb->core.tip = NULL;
 	xnarch_init_root_tcb(thread);
+	thread->host_pid = 0;
 }
 
 int pipeline_leave_inband(void)
Signature · 1 line
2.47.3