Date: Wed, 7 Feb 2007 18:29:31 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 114194 for review Message-ID: <200702071829.l17ITVhg036284@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114194 Change 114194 by rdivacky@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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702071829.l17ITVhg036284>