[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] linux-user mmap bug
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] linux-user mmap bug |
Date: |
Fri, 21 May 2010 09:38:17 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-3.fc13 Thunderbird/3.0.4 |
On 05/21/2010 06:28 AM, Edgar E. Iglesias wrote:
> ptr = mmap(g2h(addr), size, PROT_NONE,
> - MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
> + /* When the kernel returns addresses that the guest
> + cannot use we might need to fallback to fixed
> + allocations. */
> + (addr ? MAP_FIXED : 0)
> + | MAP_ANONYMOUS|MAP_PRIVATE|MAP_NORESERVE, -1, 0);
NACK. We are in fact probing for a free address in this loop,
so you don't know that the address being tested is in fact free.
I have a patch series that attempts to clean this up, but it
isn't quite optimal. I'll post it for reference, however.
r~