Date: Wed, 25 Jun 2003 11:40:47 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Olivier Houchard <cognet@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern kern_prot.c Message-ID: <20030625113931.I72722@root.org> In-Reply-To: <20030625132838.643CB37B415@hub.freebsd.org> References: <20030625132838.643CB37B415@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 25 Jun 2003, Olivier Houchard wrote:
> Modified files:
> sys/kern kern_prot.c
> Log:
> At this point targp will always be NULL, so remove the useless if.
>
> Revision Changes Path
> 1.173 +0 -2 src/sys/kern/kern_prot.c
>
> --- src/sys/kern/kern_prot.c:1.172 Sun Jun 15 08:57:42 2003
> +++ src/sys/kern/kern_prot.c Wed Jun 25 06:28:32 2003
> @@ -404,8 +404,6 @@
> sx_xlock(&proctree_lock);
> if (uap->pid != 0 && uap->pid != curp->p_pid) {
> if ((targp = pfind(uap->pid)) == NULL) {
> - if (targp)
> - PROC_UNLOCK(targp);
> error = ESRCH;
> goto done;
> }
Did you intend to remove the PROC_UNLOCK along with the 'if'? It seems
it is still needed since at least the proctree_lock is still held.
-Nate
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030625113931.I72722>
