PERFORCE change 103704 for review

Roman Divacky rdivacky at FreeBSD.org
Sat Aug 12 12:43:16 UTC 2006


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

Change 103704 by rdivacky at rdivacky_witten on 2006/08/12 12:42:19

	Dont call linux_proc_init() in execve() in a case when the newly execed
	process is fbsd (or generally non-linux) one.

Affected files ...

.. //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#42 edit

Differences ...

==== //depot/projects/soc2006/rdivacky_linuxolator/i386/linux/linux_machdep.c#42 (text+ko) ====

@@ -139,7 +139,13 @@
 	if (error == 0)
 		error = kern_execve(td, &eargs, NULL);
 	if (error == 0)
-   	   	error = linux_proc_init(td, 0, 0);
+	   	/* linux process can exec fbsd one, dont attempt
+		 * to create emuldata for such process using
+		 * linux_proc_init, this leads to a panic on KASSERT
+		 * because such process has p->p_emuldata == NULL
+		 */
+	   	if (td->td_proc->p_sysent == &elf_linux_sysvec)
+   		   	error = linux_proc_init(td, 0, 0);
 	return (error);
 }
 


More information about the p4-projects mailing list