From owner-svn-src-all@FreeBSD.ORG Fri Mar 16 10:59:05 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4ADA6106566C; Fri, 16 Mar 2012 10:59:05 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 34FDE8FC0A; Fri, 16 Mar 2012 10:59:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q2GAx5P7014827; Fri, 16 Mar 2012 10:59:05 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q2GAx4Ae014825; Fri, 16 Mar 2012 10:59:05 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201203161059.q2GAx4Ae014825@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 16 Mar 2012 10:59:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r233028 - stable/9/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 16 Mar 2012 10:59:05 -0000 Author: kib Date: Fri Mar 16 10:59:04 2012 New Revision: 233028 URL: http://svn.freebsd.org/changeset/base/233028 Log: MFC r232947: Lock the process around manipulations with p_flag. Modified: stable/9/sys/kern/kern_exit.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_exit.c ============================================================================== --- stable/9/sys/kern/kern_exit.c Fri Mar 16 10:51:42 2012 (r233027) +++ stable/9/sys/kern/kern_exit.c Fri Mar 16 10:59:04 2012 (r233028) @@ -738,10 +738,12 @@ proc_reap(struct thread *td, struct proc LIST_REMOVE(p, p_list); /* off zombproc */ sx_xunlock(&allproc_lock); LIST_REMOVE(p, p_sibling); + PROC_LOCK(p); if (p->p_flag & P_ORPHAN) { LIST_REMOVE(p, p_orphan); p->p_flag &= ~P_ORPHAN; } + PROC_UNLOCK(p); leavepgrp(p); #ifdef PROCDESC if (p->p_procdesc != NULL)