PERFORCE change 113103 for review

Roman Divacky rdivacky at FreeBSD.org
Thu Jan 18 10:17:15 UTC 2007


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

Change 113103 by rdivacky at rdivacky_witten on 2007/01/18 10:17:04

	We have to lock the em in a case of child == 0 because its looked up
	thus shared.

Affected files ...

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

Differences ...

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

@@ -99,7 +99,7 @@
 		}
 	} else {
 		/* lookup the old one */
-		em = em_find(td->td_proc, EMUL_DONTLOCK);
+		em = em_find(td->td_proc, EMUL_DOLOCK);
 		KASSERT(em != NULL, ("proc_init: emuldata not found in exec case.\n"));
 	}
 
@@ -139,7 +139,8 @@
 		/* we might have a sleeping linux_schedtail */
 		wakeup(&p->p_emuldata);
 		PROC_UNLOCK(p);
-	}
+	} else
+	   	EMUL_UNLOCK(&emul_lock);
 
 	return (0);
 }


More information about the p4-projects mailing list