Re: mmap(2) MAP_FIXED isn't thread-safe (+testcase)

From: Tijl Coosemans <tijl_at_ulyssis.org>
Date: Tue, 7 Aug 2007 15:44:21 +0200
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.
Received on Tue Aug 07 2007 - 11:44:27 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:15 UTC