diff options
author | Ingo Molnar <mingo@elte.hu> | 2011-01-09 10:42:21 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-01-09 10:42:21 +0100 |
commit | 4385428a477559b26736cc3c80d8b68f31126c71 (patch) | |
tree | 8eb0cbc78e79c368687fa13a1e0674ae537f830f /kernel/fork.c | |
parent | 047a3772feaae8e43d81d790f3d3f80dae8ae676 (diff) | |
parent | 2d75af2f2a7a6103a6d539a492fe81deacabde44 (diff) | |
download | op-kernel-dev-4385428a477559b26736cc3c80d8b68f31126c71.zip op-kernel-dev-4385428a477559b26736cc3c80d8b68f31126c71.tar.gz |
Merge branch 'tip/perf/core' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 5447dc7..7d164e2 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -174,8 +174,10 @@ static inline void free_signal_struct(struct signal_struct *sig) static inline void put_signal_struct(struct signal_struct *sig) { - if (atomic_dec_and_test(&sig->sigcnt)) + if (atomic_dec_and_test(&sig->sigcnt)) { + sched_autogroup_exit(sig); free_signal_struct(sig); + } } void __put_task_struct(struct task_struct *tsk) @@ -905,6 +907,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk) posix_cpu_timers_init_group(sig); tty_audit_fork(sig); + sched_autogroup_fork(sig); sig->oom_adj = current->signal->oom_adj; sig->oom_score_adj = current->signal->oom_score_adj; @@ -1315,7 +1318,7 @@ bad_fork_cleanup_mm: } bad_fork_cleanup_signal: if (!(clone_flags & CLONE_THREAD)) - free_signal_struct(p->signal); + put_signal_struct(p->signal); bad_fork_cleanup_sighand: __cleanup_sighand(p->sighand); bad_fork_cleanup_fs: |