From owner-freebsd-current@FreeBSD.ORG Tue Aug 7 13:44:27 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75D8916A421 for ; Tue, 7 Aug 2007 13:44:27 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from mailrelay007.isp.belgacom.be (mailrelay007.isp.belgacom.be [195.238.6.173]) by mx1.freebsd.org (Postfix) with ESMTP id 1569B13C480 for ; Tue, 7 Aug 2007 13:44:26 +0000 (UTC) (envelope-from tijl@ulyssis.org) Received: from 77.206-245-81.adsl-dyn.isp.belgacom.be (HELO kalimero.kotnet.org) ([81.245.206.77]) by mailrelay007.isp.belgacom.be with ESMTP; 07 Aug 2007 15:44:25 +0200 Received: from localhost (localhost [127.0.0.1]) by kalimero.kotnet.org (8.14.1/8.14.1) with ESMTP id l77DiOEb001415; Tue, 7 Aug 2007 15:44:24 +0200 (CEST) (envelope-from tijl@ulyssis.org) From: Tijl Coosemans To: freebsd-current@freebsd.org Date: Tue, 7 Aug 2007 15:44:21 +0200 User-Agent: KMail/1.9.7 References: <200708051656.50168.tijl@ulyssis.org> <200708062032.10514.tijl@ulyssis.org> <20070807103910.GI2738@deviant.kiev.zoral.com.ua> In-Reply-To: <20070807103910.GI2738@deviant.kiev.zoral.com.ua> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200708071544.23556.tijl@ulyssis.org> Cc: Kostik Belousov , wine-freebsd@hub.org Subject: Re: mmap(2) MAP_FIXED isn't thread-safe (+testcase) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Aug 2007 13:44:27 -0000 On Tuesday 07 August 2007 12:39:11 Kostik Belousov wrote: > On Mon, Aug 06, 2007 at 08:32:08PM +0200, Tijl Coosemans wrote: >> I don't think you can do this. Now, when vm_map_find() is called >> with find_space=FALSE, it will delete any existing mapping instead >> of failing if the address is not available. Have you checked all >> locations where this function is called to make sure this isn't >> harmful? > > Yes, I looked over this when writing the patch. I think this is what > actually supposed to happen in that case. > > Anyway, to not diverge from the old behaviour when fixing the issue, > please test patch below. I do not like introducing recursive locks > where it is quite easy to avoid them. Works for me. I've added it to the Wine wiki to give it wider testing.