diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-08-24 06:25:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-08-24 06:25:54 -0400 |
commit | 5f9ece02401116b29eb04396b99ea092acb75dd8 (patch) | |
tree | e10386e2dc63c275646b4eb0bed857da7bf86c6a /kernel/fork.c | |
parent | 9f51e24ee8b5a1595b6a5ac0c2be278a16488e75 (diff) | |
parent | 422bef879e84104fee6dc68ded0e371dbeb5f88e (diff) |
Merge commit 'v2.6.31-rc7' into x86/cleanups
Merge reason: we were on -rc1 before - go up to -rc7
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 467746b3f0aa..144326b7af50 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/module.h> | 17 | #include <linux/module.h> |
18 | #include <linux/vmalloc.h> | 18 | #include <linux/vmalloc.h> |
19 | #include <linux/completion.h> | 19 | #include <linux/completion.h> |
20 | #include <linux/mnt_namespace.h> | ||
21 | #include <linux/personality.h> | 20 | #include <linux/personality.h> |
22 | #include <linux/mempolicy.h> | 21 | #include <linux/mempolicy.h> |
23 | #include <linux/sem.h> | 22 | #include <linux/sem.h> |
@@ -568,18 +567,18 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) | |||
568 | * the value intact in a core dump, and to save the unnecessary | 567 | * the value intact in a core dump, and to save the unnecessary |
569 | * trouble otherwise. Userland only wants this done for a sys_exit. | 568 | * trouble otherwise. Userland only wants this done for a sys_exit. |
570 | */ | 569 | */ |
571 | if (tsk->clear_child_tid | 570 | if (tsk->clear_child_tid) { |
572 | && !(tsk->flags & PF_SIGNALED) | 571 | if (!(tsk->flags & PF_SIGNALED) && |
573 | && atomic_read(&mm->mm_users) > 1) { | 572 | atomic_read(&mm->mm_users) > 1) { |
574 | u32 __user * tidptr = tsk->clear_child_tid; | 573 | /* |
574 | * We don't check the error code - if userspace has | ||
575 | * not set up a proper pointer then tough luck. | ||
576 | */ | ||
577 | put_user(0, tsk->clear_child_tid); | ||
578 | sys_futex(tsk->clear_child_tid, FUTEX_WAKE, | ||
579 | 1, NULL, NULL, 0); | ||
580 | } | ||
575 | tsk->clear_child_tid = NULL; | 581 | tsk->clear_child_tid = NULL; |
576 | |||
577 | /* | ||
578 | * We don't check the error code - if userspace has | ||
579 | * not set up a proper pointer then tough luck. | ||
580 | */ | ||
581 | put_user(0, tidptr); | ||
582 | sys_futex(tidptr, FUTEX_WAKE, 1, NULL, NULL, 0); | ||
583 | } | 582 | } |
584 | } | 583 | } |
585 | 584 | ||
@@ -1269,6 +1268,7 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1269 | write_unlock_irq(&tasklist_lock); | 1268 | write_unlock_irq(&tasklist_lock); |
1270 | proc_fork_connector(p); | 1269 | proc_fork_connector(p); |
1271 | cgroup_post_fork(p); | 1270 | cgroup_post_fork(p); |
1271 | perf_counter_fork(p); | ||
1272 | return p; | 1272 | return p; |
1273 | 1273 | ||
1274 | bad_fork_free_pid: | 1274 | bad_fork_free_pid: |
@@ -1408,12 +1408,6 @@ long do_fork(unsigned long clone_flags, | |||
1408 | if (clone_flags & CLONE_VFORK) { | 1408 | if (clone_flags & CLONE_VFORK) { |
1409 | p->vfork_done = &vfork; | 1409 | p->vfork_done = &vfork; |
1410 | init_completion(&vfork); | 1410 | init_completion(&vfork); |
1411 | } else if (!(clone_flags & CLONE_VM)) { | ||
1412 | /* | ||
1413 | * vfork will do an exec which will call | ||
1414 | * set_task_comm() | ||
1415 | */ | ||
1416 | perf_counter_fork(p); | ||
1417 | } | 1411 | } |
1418 | 1412 | ||
1419 | audit_finish_fork(p); | 1413 | audit_finish_fork(p); |