From owner-freebsd-current Thu Jul 18 11:55:42 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D94637B400; Thu, 18 Jul 2002 11:55:39 -0700 (PDT) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2696443E5E; Thu, 18 Jul 2002 11:55:39 -0700 (PDT) (envelope-from bright@elvis.mu.org) Received: by elvis.mu.org (Postfix, from userid 1192) id F0455AE272; Thu, 18 Jul 2002 11:55:38 -0700 (PDT) Date: Thu, 18 Jul 2002 11:55:38 -0700 From: Alfred Perlstein To: Matthew Dillon Cc: John Baldwin , current@FreeBSD.ORG Subject: Re: Questions about kern_descrip.c Message-ID: <20020718185538.GJ77219@elvis.mu.org> References: <200207181840.g6IIe25G019269@apollo.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200207181840.g6IIe25G019269@apollo.backplane.com> User-Agent: Mutt/1.3.27i Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG * Matthew Dillon [020718 11:40] wrote: > > fdalloc() does not reserve the descriptor number it > returns, it simply finds a free slot and says 'this > index is a free slot'. Even in the latest -current, > fdalloc() releases the fdp lock when it goes to > MALLOC so the race appears to still be present. This is true. I think one way to fix this is to preallocate the 'struct file' you're going to put into the array and have fdalloc() insert the created file instead of just finding a slot. Problem is that it's a bunch of grunt work to do this. -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' Tax deductible donations for FreeBSD: http://www.freebsdfoundation.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message