* [Qemu-devel] [PATCH] linux-user: mmap_reserve() not controlled by RESERVED_VA
@ 2010-09-14 5:22 amateur
0 siblings, 0 replies; only message in thread
From: amateur @ 2010-09-14 5:22 UTC (permalink / raw)
To: Qemu Devel
mmap_reserve() should be called only when RESERVED_VA is enabled.
Otherwise, unmaped virtual address space will never be reusable. This
bug will exhaust virtual address space in extreme conditions.
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
index e10a6ef..50748a2 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
@@ -697,7 +697,9 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
old_size, new_size,
flags | MREMAP_FIXED,
g2h(mmap_start));
- mmap_reserve(old_addr, old_size);
+ if ( RESERVED_VA ) {
+ mmap_reserve(old_addr, old_size);
+ }
}
} else {
int prot = 0;
--
If you don't drink it, someone else will.
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-09-14 5:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-14 5:22 [Qemu-devel] [PATCH] linux-user: mmap_reserve() not controlled by RESERVED_VA amateur
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).