Messages in this thread Patch in this message | | | Date | Sat, 18 Mar 2006 20:41:10 +0300 | From | Oleg Nesterov <> | Subject | [PATCH] for 2.6.16, disable unshare_vm() |
| |
sys_unshare() does mmput(new_mm). This is not enough if we have mm->core_waiters. This patch is a temporary fix for soon to be released 2.6.16.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- MM/kernel/fork.c~ 2006-03-18 23:15:13.000000000 +0300 +++ MM/kernel/fork.c 2006-03-18 23:15:56.000000000 +0300 @@ -1512,9 +1512,7 @@ static int unshare_vm(unsigned long unsh if ((unshare_flags & CLONE_VM) && (mm && atomic_read(&mm->mm_users) > 1)) { - *new_mmp = dup_mm(current); - if (!*new_mmp) - return -ENOMEM; + return -EINVAL; } return 0; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |