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: Richard Henderson
Subject: Re: [PATCH v2 7/9] bsd-user/mmap.c: Don't mmap fd == -1 independently from MAP_ANON flag
Date: Thu, 23 Sep 2021 10:43:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

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.


r~



reply via email to

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