From owner-cvs-all Wed Oct 2 23:13: 8 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 50B4B37B401; Wed, 2 Oct 2002 23:13:07 -0700 (PDT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id C63A743E3B; Wed, 2 Oct 2002 23:13:06 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Received: from mousie.catspoiler.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.5/8.12.5) with ESMTP id g936CxvU017849; Wed, 2 Oct 2002 23:13:03 -0700 (PDT) (envelope-from dl-freebsd@catspoiler.org) Message-Id: <200210030613.g936CxvU017849@gw.catspoiler.org> Date: Wed, 2 Oct 2002 23:12:59 -0700 (PDT) From: Don Lewis Subject: Re: cvs commit: src/sys/kern kern_event.c To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: <200210030603.g9363QEx044482@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 2 Oct, Don Lewis wrote: > truckman 2002/10/02 23:03:26 PDT > > Modified files: > sys/kern kern_event.c > Log: > hashinit() calls MALLOC(), so release the filedesc lock in knote_attach() > before calling hashinit() and relock afterwards, taking care to see that > we don't lose a race. > > Revision Changes Path > 1.46 +16 -4 src/sys/kern/kern_event.c knote_attach() could use some cleanup. It would be possible to get rid of some extraneous unlocking and relocking if the calls to free() were moved to the end and made conditional. I'm not much of a fan of this type of conditional code, but it is less costly than doing a bunch of extra lock manipulation. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message