PERFORCE change 113204 for review

Roman Divacky rdivacky at FreeBSD.org
Sat Jan 20 10:13:50 UTC 2007


http://perforce.freebsd.org/chv.cgi?CH=113204

Change 113204 by rdivacky at rdivacky_witten on 2007/01/20 10:13:11

	No need to synchronize linux_schedtail with linux_proc_init. We know
	that p->p_emuldata is properly initialized in the time when the children
	can run.

Affected files ...

.. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#25 edit

Differences ...

==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#25 (text+ko) ====

@@ -136,8 +136,6 @@
 		p = pfind(child);
 		KASSERT(p != NULL, ("process not found in proc_init\n"));
 		p->p_emuldata = em;
-		/* we might have a sleeping linux_schedtail */
-		wakeup(&p->p_emuldata);
 		PROC_UNLOCK(p);
 	} else
 		EMUL_UNLOCK(&emul_lock);
@@ -277,22 +275,10 @@
 	if (__predict_true(p->p_sysent != &elf_linux_sysvec))
 		return;
 
-retry:
 	/* find the emuldata */
 	em = em_find(p, EMUL_DOLOCK);
 
-	if (em == NULL) {
-		/*
-		 * We might have been called before proc_init for this
-		 * process so tsleep and be woken up by it. We use
-		 * p->p_emuldata for this
-		 */
-
-		error = tsleep(&p->p_emuldata, PLOCK, "linux_schedtail", hz);
-		if (error == 0)
-			goto retry;
-		panic("no emuldata found for userreting process.\n");
-	}
+	KASSERT(em != NULL, ("linux_schedtail: emuldata not found.\n"));
 	child_set_tid = em->child_set_tid;
 	EMUL_UNLOCK(&emul_lock);
 


More information about the p4-projects mailing list