aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2006-03-18 12:41:10 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-18 13:49:36 -0500
commit2d61b86775a5676a8fba2ba2f0f869564e35c630 (patch)
treeafdb967ec1bb3ddd212acdd8f25675c371f7e6e7 /kernel
parent265a92856b17524c87da0258ac0d3cec80ae1d35 (diff)
[PATCH] disable unshare(CLONE_VM) for now
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> [ Checked with Uli: "I'm not planning to use unshare(CLONE_VM). It's not needed for any functionality planned so far. What we (as in Red Hat) need unshare() for now is the filesystem side." ] Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 46060cb24af..b373322ca49 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -1478,9 +1478,7 @@ static int unshare_vm(unsigned long unshare_flags, struct mm_struct **new_mmp)
1478 1478
1479 if ((unshare_flags & CLONE_VM) && 1479 if ((unshare_flags & CLONE_VM) &&
1480 (mm && atomic_read(&mm->mm_users) > 1)) { 1480 (mm && atomic_read(&mm->mm_users) > 1)) {
1481 *new_mmp = dup_mm(current); 1481 return -EINVAL;
1482 if (!*new_mmp)
1483 return -ENOMEM;
1484 } 1482 }
1485 1483
1486 return 0; 1484 return 0;