From owner-svn-src-all@FreeBSD.ORG Fri Mar 18 08:40:23 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E04C106566B; Fri, 18 Mar 2011 08:40:23 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9048FC16; Fri, 18 Mar 2011 08:40:22 +0000 (UTC) Received: from julian-mac.elischer.org (home-nat.elischer.org [67.100.89.137]) (authenticated bits=0) by vps1.elischer.org (8.14.4/8.14.4) with ESMTP id p2I8eLBi002659 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Fri, 18 Mar 2011 01:40:22 -0700 (PDT) (envelope-from julian@freebsd.org) Message-ID: <4D831A82.7070308@freebsd.org> Date: Fri, 18 Mar 2011 01:40:34 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: Edward Tomasz Napierala References: <201103180647.p2I6lNCB051745@svn.freebsd.org> In-Reply-To: <201103180647.p2I6lNCB051745@svn.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r219727 - head/sys/vm 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, 18 Mar 2011 08:40:23 -0000 On 3/17/11 11:47 PM, Edward Tomasz Napierala wrote: > Author: trasz > Date: Fri Mar 18 06:47:23 2011 > New Revision: 219727 > URL: http://svn.freebsd.org/changeset/base/219727 > > Log: > In vm_daemon(), when iterating over all processes in the system, skip those > which are not yet fully initialized (i.e. ones with p_state == PRS_NEW). > Without it, we could panic in _thread_lock_flags(). > > Note that there may be other instances of FOREACH_PROC_IN_SYSTEM() that > require similar fix. In the past each process was only put on the process list after it was fully set up. Did someone change that recently? that would be "A Bad Thing" (TM). > > Reported by: pho, keramida > Discussed with: kib > > Modified: > head/sys/vm/vm_pageout.c > > Modified: head/sys/vm/vm_pageout.c > ============================================================================== > --- head/sys/vm/vm_pageout.c Thu Mar 17 22:47:52 2011 (r219726) > +++ head/sys/vm/vm_pageout.c Fri Mar 18 06:47:23 2011 (r219727) > @@ -1281,6 +1281,8 @@ vm_pageout_oom(int shortage) > FOREACH_PROC_IN_SYSTEM(p) { > int breakout; > > + if (p->p_state != PRS_NORMAL) > + continue; > if (PROC_TRYLOCK(p) == 0) > continue; > /* > @@ -1649,6 +1651,8 @@ vm_daemon() > FOREACH_PROC_IN_SYSTEM(p) { > vm_pindex_t limit, size; > > + if (p->p_state != PRS_NORMAL) > + continue; > /* > * if this is a system process or if we have already > * looked at this process, skip it. > >