Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Jan 2007 10:13:49 GMT
From:      Roman Divacky <rdivacky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 113204 for review
Message-ID:  <200701201013.l0KADnfa071828@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=113204

Change 113204 by rdivacky@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);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701201013.l0KADnfa071828>