Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

[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>

authored by

Oleg Nesterov and committed by
Linus Torvalds
2d61b867 265a9285

+1 -3
+1 -3
kernel/fork.c
··· 1478 1478 1479 1479 if ((unshare_flags & CLONE_VM) && 1480 1480 (mm && atomic_read(&mm->mm_users) > 1)) { 1481 - *new_mmp = dup_mm(current); 1482 - if (!*new_mmp) 1483 - return -ENOMEM; 1481 + return -EINVAL; 1484 1482 } 1485 1483 1486 1484 return 0;