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

From: Tijl Coosemans <tijl_at_ulyssis.org>
Date: Tue, 7 Aug 2007 01:27:13 +0200
On Sunday 05 August 2007 16:56:46 Tijl Coosemans wrote:
> The problem is in sys/vm/vm_mmap.c:vm_mmap(). In case of MAP_FIXED
> first vm_map_remove() is called and then later vm_map_find(). This
> would need some locking, but I don't know which lock or how to
> approach this, so can somebody have a look at this?

I had another go at it today. I've attached a patch. It uses
vm_map_lock(), but to do that I made the lock recursive.

Received on Mon Aug 06 2007 - 21:27:19 UTC

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