Messages in this thread Patch in this message | | | Date | Mon, 17 Aug 1998 21:11:07 +0200 (CEST) | From | Andrea Arcangeli <> | Subject | [patch] multithread execve bug |
| |
I think to have discovered and fixed a bug in the execve syscall. In exec_mmap() if current->mm->count is > 1, linux alloc another mm struct, but the new mm->segments pointer still point to the old process segments area so if the new executed process will exit, it will release the mm->segments that is shared also by the parent process. This segment sharing could cause also other problems I think.
It cure the wine/kmod/vfree segfault that was on my TODO list from some weeks. Patch against 115.
Andrea[s] Arcangeli
diff -urN /home/andrea/devel/kernel-tree/linux-2.1.115/fs/exec.c linux/fs/exec.c --- /home/andrea/devel/kernel-tree/linux-2.1.115/fs/exec.c Sun Jun 14 02:35:42 1998 +++ linux/fs/exec.c Mon Aug 17 20:30:08 1998 @@ -414,6 +414,7 @@ mm->cpu_vm_mask = (1UL << smp_processor_id()); mm->total_vm = 0; mm->rss = 0; + copy_segments(current->pid, current, mm); old_mm = current->mm; current->mm = mm; retval = new_page_tables(current);
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |