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 <[email protected]> --- 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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: [PATCH] for 2.6.16, disable unshare_vm()
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] for 2.6.16, disable unshare_vm()
- References:
- [PATCH] unshare: Cleanup up the sys_unshare interface before we are committed.
- From: [email protected] (Eric W. Biederman)
- [PATCH] unshare: Use rcu_assign_pointer when setting sighand
- From: [email protected] (Eric W. Biederman)
- Re: [PATCH] unshare: Use rcu_assign_pointer when setting sighand
- From: Oleg Nesterov <[email protected]>
- Re: [PATCH] unshare: Use rcu_assign_pointer when setting sighand
- From: Andrew Morton <[email protected]>
- Re: [PATCH] unshare: Use rcu_assign_pointer when setting sighand
- From: Oleg Nesterov <[email protected]>
- Re: [PATCH] unshare: Use rcu_assign_pointer when setting sighand
- From: Janak Desai <[email protected]>
- Re: [PATCH] unshare: Use rcu_assign_pointer when setting sighand
- From: Oleg Nesterov <[email protected]>
- [PATCH] unshare: Cleanup up the sys_unshare interface before we are committed.
- Prev by Date: [PATCH 2.6.16-rc6 1/1] ipw2200: Add Kconfig entries for QOS and Monitor mode
- Next by Date: Re: [PATCH] for 2.6.16, disable unshare_vm()
- Previous by thread: Re: [PATCH] unshare: Use rcu_assign_pointer when setting sighand
- Next by thread: Re: [PATCH] for 2.6.16, disable unshare_vm()
- Index(es):