VM: make munmap(2) round length up, not down (reported by Althaf K Backer)
This commit is contained in:
parent
0dcf5b7aa8
commit
be992434e7
1 changed files with 2 additions and 1 deletions
|
@ -374,7 +374,8 @@ PUBLIC int do_munmap(message *m)
|
|||
}
|
||||
|
||||
len = m->VMUM_LEN;
|
||||
len -= len % VM_PAGE_SIZE;
|
||||
if (len % VM_PAGE_SIZE)
|
||||
len += VM_PAGE_SIZE - (len % VM_PAGE_SIZE);
|
||||
|
||||
if(addr != vr->vaddr || len > vr->length || len < VM_PAGE_SIZE) {
|
||||
return EFAULT;
|
||||
|
|
Loading…
Reference in a new issue