projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0e102d
)
linux-user: mmap_reserve() not controlled by RESERVED_VA
author
amateur
<tianlei.zhao@gmail.com>
Tue, 14 Sep 2010 05:22:34 +0000
(13:22 +0800)
committer
Riku Voipio
<riku.voipio@nokia.com>
Fri, 3 Dec 2010 13:09:38 +0000
(15:09 +0200)
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.
Signed-off-by: Riku Voipio <riku.voipio@nokia.com>
linux-user/mmap.c
patch
|
blob
|
history
diff --git
a/linux-user/mmap.c
b/linux-user/mmap.c
index
035dfbd
..
abf21f6
100644
(file)
--- 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;