Fix for mm0 bss mapping of zero pages starting from wrong offset

bss segment may have some of it at the end of data, but the bits
that lie on a new page need to be mmaped as anonymous. When this
occured we were not passing the new page boundary but the last
data page where bss started
This commit is contained in:
Bahadir Balban
2009-11-05 13:43:38 +02:00
parent 425193efa9
commit 9b71f2bfe2

View File

@@ -614,7 +614,7 @@ int task_map_bss(struct vm_file *f, struct exec_file_desc *efd, struct tcb *task
* map those as anonymous zero pages
*/
if (task->bss_end > bss_mmap_start) {
if (IS_ERR(mapped = do_mmap(0, 0, task, task->bss_start,
if (IS_ERR(mapped = do_mmap(0, 0, task, bss_mmap_start,
VM_READ | VM_WRITE |
VMA_PRIVATE | VMA_ANONYMOUS,
__pfn(page_align_up(task->bss_end) -