From owner-svn-src-all@FreeBSD.ORG Wed Sep 3 09:49:27 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EF06F23; Wed, 3 Sep 2014 09:49:27 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0C2E61BC5; Wed, 3 Sep 2014 09:49:25 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id s839nHxU003325 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 3 Sep 2014 13:49:17 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id s839nGkV003324; Wed, 3 Sep 2014 13:49:16 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 3 Sep 2014 13:49:16 +0400 From: Gleb Smirnoff To: Mateusz Guzik , kib@FreeBSD.org Subject: Re: svn commit: r270999 - head/sys/kern Message-ID: <20140903094916.GO7693@FreeBSD.org> References: <201409030814.s838E7A2084257@svn.freebsd.org> <20140903085523.GB13871@dft-labs.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140903085523.GB13871@dft-labs.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2014 09:49:27 -0000 Mateusz, Kostik, On Wed, Sep 03, 2014 at 10:55:23AM +0200, Mateusz Guzik wrote: M> > Modified: head/sys/kern/kern_proc.c M> > ============================================================================== M> > --- head/sys/kern/kern_proc.c Wed Sep 3 08:13:46 2014 (r270998) M> > +++ head/sys/kern/kern_proc.c Wed Sep 3 08:14:07 2014 (r270999) M> > @@ -921,10 +921,11 @@ fill_kinfo_proc_only(struct proc *p, str M> > kp->ki_xstat = p->p_xstat; M> > kp->ki_acflag = p->p_acflag; M> > kp->ki_lock = p->p_lock; M> > - if (p->p_pptr) M> > + if (p->p_pptr) { M> > kp->ki_ppid = proc_realparent(p)->p_pid; M> > - if (p->p_flag & P_TRACED) M> > - kp->ki_tracer = p->p_pptr->p_pid; M> > + if (p->p_flag & P_TRACED) M> > + kp->ki_tracer = p->p_pptr->p_pid; M> > + } M> > } M> > M> > /* M> > M> M> p_pptr must be non-NULL if P_TRACED is set. If there is no way to M> annotate it for coverity, this change deserves a comment in the code M> (and in retrospect previous code should have had appropriate comment as M> well). Thanks for explanation. I'd suggest to leave the change in, since now it is a micro-micro-optimization :) -- Totus tuus, Glebius.