Commit 2d61b86775a5676a8fba2ba2f0f869564e35c630

Authored by Oleg Nesterov
Committed by Linus Torvalds
1 parent 265a92856b

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

Showing 1 changed file with 1 additions and 3 deletions Side-by-side Diff

... ... @@ -1478,9 +1478,7 @@
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;