From owner-cvs-all Thu Jul 18 8:22:48 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 97DAC37B401 for ; Thu, 18 Jul 2002 08:22:44 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 242BB43E31 for ; Thu, 18 Jul 2002 08:22:44 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 508 invoked from network); 18 Jul 2002 15:22:42 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 18 Jul 2002 15:22:42 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g6IFMf061582; Thu, 18 Jul 2002 11:22:41 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020717223752.70126.qmail@web20905.mail.yahoo.com> Date: Thu, 18 Jul 2002 11:22:46 -0400 (EDT) From: John Baldwin To: David Xu Subject: Re: cvs commit: src/sys/kern kern_descrip.c Cc: "cvs-committers@FreeBSD.org" Cc: "cvs-committers@FreeBSD.org" , "cvs-all@FreeBSD.org" 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 17-Jul-2002 David Xu wrote: >> This doesn't hold filelist_lock across fdalloc() and thus possibly across >> malloc(). It also just holds the filedesc pointer across malloc() so >> that fdalloc() is no longer racy (no internal races or introducing ones >> into calling code). >> >> -- >> >> John Baldwin <>< http://www.FreeBSD.org/~jhb/ >> "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ > > your patch seems reasonable, current dup and fcntl with F_DUPFD have > this race condition, to-be-dup'd descriptor could be close by another > thread beforce fdalloc returns, I sent a patch to alfred who I think is > FILEDESC locking maintainer to fix this race in do_dup, I didn't touch > fdalloc() because I think a big patch could be refused. Well, I think it may be busted because FILEDESC lock may be a mutex now rather than a sx lock. It can still be fixed though I think. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message