qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently fr


From: Warner Losh
Subject: Re: [PATCH v2 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag
Date: Sun, 26 Sep 2021 11:08:03 -0600



On Fri, Sep 24, 2021 at 6:00 AM Richard Henderson <richard.henderson@linaro.org> wrote:
On 9/21/21 9:56 PM, Warner Losh wrote:
>           /* no page was there, so we allocate one */
>           void *p = mmap(host_start, qemu_host_page_size, prot,
> -                       flags | MAP_ANON, -1, 0);
> +                       flags | ((fd != -1) ? MAP_ANON : 0), -1, 0);

I don't understand this change, given that the actual fd passed is always -1.

That's a very good question. I'll have to trace down why that was made because
I'm having trouble with it as well now that I'm trying to defend it.

Warner
 

r~

reply via email to

[Prev in Thread] Current Thread [Next in Thread]