From 9b71f2bfe2988054908e38572c093664f0bd8624 Mon Sep 17 00:00:00 2001 From: Bahadir Balban Date: Thu, 5 Nov 2009 13:43:38 +0200 Subject: [PATCH] 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 --- conts/posix/mm0/mm/task.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conts/posix/mm0/mm/task.c b/conts/posix/mm0/mm/task.c index b28200f..aee20b6 100644 --- a/conts/posix/mm0/mm/task.c +++ b/conts/posix/mm0/mm/task.c @@ -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) -