diff --git a/sys/compat/linux/linux_emul.c b/sys/compat/linux/linux_emul.c index 6a1098d..c4f7a73 100644 --- a/sys/compat/linux/linux_emul.c +++ b/sys/compat/linux/linux_emul.c @@ -321,7 +321,11 @@ linux_proc_exit(void *arg __unused, struct proc *p) if (__predict_false(q->p_sysent != &elf_linux_sysvec)) continue; em = em_find(q, EMUL_DOLOCK); - KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid)); + /* + * XXX check for lost race + */ + if (em == NULL) + continue; PROC_LOCK(q); if ((q->p_flag & P_WEXIT) == 0 && em->pdeath_signal != 0) { kern_psignal(q, em->pdeath_signal); diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 7587272..6398ce8 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1542,12 +1542,10 @@ linux_getppid(struct thread *td, struct linux_getppid_args *args) PROC_UNLOCK(p); /* if its also linux process */ - if (pp->p_sysent == &elf_linux_sysvec) { - em = em_find(pp, EMUL_DONTLOCK); - KASSERT(em != NULL, ("getppid: parent emuldata not found.\n")); - + if (pp->p_sysent == &elf_linux_sysvec && + (em = em_find(pp, EMUL_DONTLOCK)) != NULL) td->td_retval[0] = em->shared->group_pid; - } else + else td->td_retval[0] = pp->p_pid; PROC_UNLOCK(pp);