qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL 17/17] linux-user/mmap.c: Use end instead of real_end


From: riku . voipio
Subject: [Qemu-devel] [PULL 17/17] linux-user/mmap.c: Use end instead of real_end in target_mmap
Date: Mon, 11 Jan 2016 16:16:19 +0200

From: Chen Gang <address@hidden>

The fragment must effectively be mapped only to "end" not to "real_end"
(which is a host page aligned address, and thus this is not a fragment).
It is consistent with what it is done in the case of one single page.

Signed-off-by: Chen Gang <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Signed-off-by: Riku Voipio <address@hidden>
---
 linux-user/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index c6c478e..445e8c6 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -538,7 +538,7 @@ abi_long target_mmap(abi_ulong start, abi_ulong len, int 
prot,
         /* handle the end of the mapping */
         if (end < real_end) {
             ret = mmap_frag(real_end - qemu_host_page_size,
-                            real_end - qemu_host_page_size, real_end,
+                            real_end - qemu_host_page_size, end,
                             prot, flags, fd,
                             offset + real_end - qemu_host_page_size - start);
             if (ret == -1)
-- 
2.6.4




reply via email to

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