PERFORCE change 114194 for review
Roman Divacky
rdivacky at FreeBSD.org
Wed Feb 7 18:29:32 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=114194
Change 114194 by rdivacky at rdivacky_witten on 2007/02/07 18:29:24
Move the copyout of p2->p_pid outside the emul_lock coverage.
Affected files ...
.. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#35 edit
.. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#29 edit
Differences ...
==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#35 (text+ko) ====
@@ -632,11 +632,6 @@
em = em_find(p2, EMUL_DOLOCK);
KASSERT(em != NULL, ("clone: emuldata not found.\n"));
/* and adjust it */
- if (args->flags & CLONE_PARENT_SETTID) {
- error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid));
- if (error)
- printf(LMSG("copyout failed!"));
- }
if (args->flags & CLONE_THREAD) {
#ifdef notyet
@@ -659,6 +654,12 @@
EMUL_UNLOCK(&emul_lock);
+ if (args->flags & CLONE_PARENT_SETTID) {
+ error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid));
+ if (error)
+ printf(LMSG("copyout failed!"));
+ }
+
PROC_LOCK(p2);
p2->p_sigparent = exit_signal;
PROC_UNLOCK(p2);
==== //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#29 (text+ko) ====
@@ -445,11 +445,6 @@
em = em_find(p2, EMUL_DOLOCK);
KASSERT(em != NULL, ("clone: emuldata not found.\n"));
/* and adjust it */
- if (args->flags & CLONE_PARENT_SETTID) {
- error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid));
- if (error)
- printf(LMSG("copyout failed!"));
- }
if (args->flags & CLONE_THREAD) {
#ifdef notyet
@@ -472,6 +467,12 @@
EMUL_UNLOCK(&emul_lock);
+ if (args->flags & CLONE_PARENT_SETTID) {
+ error = copyout(&p2->p_pid, args->parent_tidptr, sizeof(p2->p_pid));
+ if (error)
+ printf(LMSG("copyout failed!"));
+ }
+
PROC_LOCK(p2);
p2->p_sigparent = exit_signal;
PROC_UNLOCK(p2);
More information about the p4-projects
mailing list