From owner-svn-src-head@FreeBSD.ORG Wed Oct 22 04:16:10 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9838C58; Wed, 22 Oct 2014 04:16:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 964D4DBA; Wed, 22 Oct 2014 04:16:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9M4GAN1098113; Wed, 22 Oct 2014 04:16:10 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9M4GAJA098112; Wed, 22 Oct 2014 04:16:10 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201410220416.s9M4GAJA098112@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 22 Oct 2014 04:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273452 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Oct 2014 04:16:10 -0000 Author: mjg Date: Wed Oct 22 04:16:09 2014 New Revision: 273452 URL: https://svnweb.freebsd.org/changeset/base/273452 Log: Plug unnecessary PRS_NEW check in kern_procctl. pfind does not return processes in such state. Modified: head/sys/kern/sys_process.c Modified: head/sys/kern/sys_process.c ============================================================================== --- head/sys/kern/sys_process.c Wed Oct 22 04:09:47 2014 (r273451) +++ head/sys/kern/sys_process.c Wed Oct 22 04:16:09 2014 (r273452) @@ -1373,10 +1373,7 @@ kern_procctl(struct thread *td, idtype_t error = ESRCH; break; } - if (p->p_state == PRS_NEW) - error = ESRCH; - else - error = p_cansee(td, p); + error = p_cansee(td, p); if (error == 0) error = kern_procctl_single(td, p, com, data); PROC_UNLOCK(p);