Date: Fri, 5 Jan 2007 12:31:59 -0500 From: John Baldwin <jhb@freebsd.org> To: Roman Divacky <rdivacky@freebsd.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: Re: PERFORCE change 112534 for review Message-ID: <200701051231.59354.jhb@freebsd.org> In-Reply-To: <200701050754.l057s5bU066108@repoman.freebsd.org> References: <200701050754.l057s5bU066108@repoman.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Friday 05 January 2007 02:54, Roman Divacky wrote: > 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. Is em->shared static for the lifetime of an em object? > 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); > } > > -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701051231.59354.jhb>