From owner-svn-src-head@FreeBSD.ORG Sun Feb 15 08:43:20 2015 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 178CEA6E; Sun, 15 Feb 2015 08:43:20 +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 03A9CC4E; Sun, 15 Feb 2015 08:43:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1F8hJvU006347; Sun, 15 Feb 2015 08:43:19 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1F8hJ6w006346; Sun, 15 Feb 2015 08:43:19 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201502150843.t1F8hJ6w006346@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 15 Feb 2015 08:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278794 - 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: Sun, 15 Feb 2015 08:43:20 -0000 Author: kib Date: Sun Feb 15 08:43:19 2015 New Revision: 278794 URL: https://svnweb.freebsd.org/changeset/base/278794 Log: Return with the process locked, caller expects p still locked after the call. Reported and tested by: bapt Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/kern/kern_procctl.c Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Sun Feb 15 08:38:43 2015 (r278793) +++ head/sys/kern/kern_procctl.c Sun Feb 15 08:43:19 2015 (r278794) @@ -239,13 +239,13 @@ reap_kill(struct thread *td, struct proc int error, error1; sx_assert(&proctree_lock, SX_LOCKED); - PROC_UNLOCK(p); if (IN_CAPABILITY_MODE(td)) return (ECAPMODE); if (rk->rk_sig <= 0 || rk->rk_sig > _SIG_MAXSIG) return (EINVAL); if ((rk->rk_flags & ~REAPER_KILL_CHILDREN) != 0) return (EINVAL); + PROC_UNLOCK(p); reap = (p->p_treeflag & P_TREE_REAPER) == 0 ? p->p_reaper : p; ksiginfo_init(&ksi); ksi.ksi_signo = rk->rk_sig;