Date: Thu, 18 Jul 2002 11:22:46 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: David Xu <bsddiy@yahoo.com> Cc: "cvs-committers@FreeBSD.org" <cvs-committers@FreeBSD.org>, "cvs-all@FreeBSD.org" <cvs-all@FreeBSD.org> Subject: Re: cvs commit: src/sys/kern kern_descrip.c Message-ID: <XFMail.20020718112246.jhb@FreeBSD.org> In-Reply-To: <20020717223752.70126.qmail@web20905.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< 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 <jhb@FreeBSD.org> <>< 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020718112246.jhb>