extend_process_region(): fix alignment

This commit is contained in:
Balazs Gerofi
2017-06-07 16:51:50 +09:00
parent b527503937
commit fedba28a93

View File

@ -2035,7 +2035,11 @@ unsigned long extend_process_region(struct process_vm *vm,
unsigned long align_p2align = vm->proc->heap_extension > PAGE_SHIFT ?
LARGE_PAGE_P2ALIGN : PAGE_P2ALIGN;
new_end_allocated = (address + (vm->proc->heap_extension - 1)) & align_mask;
new_end_allocated = (address + (PAGE_SIZE - 1)) & PAGE_MASK;
if ((new_end_allocated - end_allocated) < vm->proc->heap_extension) {
new_end_allocated = (end_allocated + vm->proc->heap_extension +
(align_size - 1)) & align_mask;
}
if (flag & VR_DEMAND_PAGING) {
p = 0;