From owner-cvs-src@FreeBSD.ORG Mon May 3 10:50:49 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B6F316A4CE for ; Mon, 3 May 2004 10:50:49 -0700 (PDT) Received: from mail1.speakeasy.net (mail1.speakeasy.net [216.254.0.201]) by mx1.FreeBSD.org (Postfix) with ESMTP id A36C943D5F for ; Mon, 3 May 2004 10:50:48 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 12479 invoked from network); 3 May 2004 17:50:48 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 3 May 2004 17:50:48 -0000 Received: from 10.50.40.205 (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i43HoiFk056848; Mon, 3 May 2004 13:50:45 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: Brian Fundakowski Feldman Date: Mon, 3 May 2004 13:13:01 -0400 User-Agent: KMail/1.6 References: <200405031510.i43FAced005343@green.homeunix.org> In-Reply-To: <200405031510.i43FAced005343@green.homeunix.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200405031313.01274.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: Colin Percival Subject: Re: cvs commit: src/sys/kern kern_clock.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 May 2004 17:50:49 -0000 On Monday 03 May 2004 11:10 am, Brian Fundakowski Feldman wrote: > Colin Percival wrote: > > cperciva 2004/05/02 17:48:11 PDT > > > > FreeBSD src repository > > > > Modified files: > > sys/kern kern_clock.c > > Log: > > Fix a race condition which could result in profprocs being decremented > > more than once if stopprofclock is called multiple times on the same > > process. > > FWIW, the sched_lock enclosing the p->p_flag modification seems pretty > bogus. Nope. The P_PROFIL flag is protected by both the proc lock and sched_lock so that we can check the flag with just sched_lock held in clock interrupt handlers that can't acquire normal mutexes. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org