Date: Fri, 5 Jan 2007 07:54:05 GMT From: Roman Divacky <rdivacky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 112534 for review Message-ID: <200701050754.l057s5bU066108@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=112534 Change 112534 by rdivacky@rdivacky_witten on 2007/01/05 07:53:57 Dont lock em in a case of just using em->shared->group_pid because the group_pid never changes. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#50 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#9 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#50 (text+ko) ==== @@ -1448,10 +1448,9 @@ #endif if (linux_use26(td)) { - em = em_find(td->td_proc, EMUL_DOLOCK); + em = em_find(td->td_proc, EMUL_DONTLOCK); KASSERT(em != NULL, ("getpid: emuldata not found.\n")); td->td_retval[0] = em->shared->group_pid; - EMUL_UNLOCK(&emul_lock); } else { td->td_retval[0] = td->td_proc->p_pid; } @@ -1490,7 +1489,7 @@ return (0); } - em = em_find(td->td_proc, EMUL_DOLOCK); + em = em_find(td->td_proc, EMUL_DONTLOCK); KASSERT(em != NULL, ("getppid: process emuldata not found.\n")); @@ -1519,7 +1518,6 @@ } else td->td_retval[0] = pp->p_pid; - EMUL_UNLOCK(&emul_lock); PROC_UNLOCK(pp); return (0); ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_signal.c#9 (text+ko) ==== @@ -561,7 +561,7 @@ PROC_UNLOCK(p); - em = em_find(p, EMUL_DOLOCK); + em = em_find(p, EMUL_DONTLOCK); if (em == NULL) { #ifdef DEBUG @@ -573,8 +573,6 @@ if (em->shared->group_pid != args->tgid) return ESRCH; - EMUL_UNLOCK(&emul_lock); - return linux_kill(td, &ka); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701050754.l057s5bU066108>