diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-07-22 16:49:01 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2015-07-22 16:55:26 -0700 |
commit | 41e85e084acea757cc7e32b6aef47e4563b47717 (patch) | |
tree | f8700294c6f298b705540f381adcb002bc0857bd /pk/vm.c | |
parent | a6da37f21720d12f0295876ce426bc081a62a7d8 (diff) | |
download | pk-41e85e084acea757cc7e32b6aef47e4563b47717.zip pk-41e85e084acea757cc7e32b6aef47e4563b47717.tar.gz pk-41e85e084acea757cc7e32b6aef47e4563b47717.tar.bz2 |
Don't let brk stomp on mmap'd regions
We were already trying to handle this case, but we got it wrong.
Diffstat (limited to 'pk/vm.c')
-rw-r--r-- | pk/vm.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -287,7 +287,7 @@ uintptr_t do_mmap(uintptr_t addr, size_t length, int prot, int flags, int fd, of addr = __do_mmap(addr, length, prot, flags, f, offset); if (addr < current.brk_max) - current.brk_max = ROUNDUP(addr + length, RISCV_PGSIZE); + current.brk_max = addr; spinlock_unlock(&vm_lock); if (f) file_decref(f); |