diff options
| author | Grant Likely <grant.likely@secretlab.ca> | 2010-12-23 00:41:14 -0700 |
|---|---|---|
| committer | Grant Likely <grant.likely@secretlab.ca> | 2010-12-23 00:41:14 -0700 |
| commit | cfb13c5db08c90311a5defdde9a0328ee788cca5 (patch) | |
| tree | 842cb60d1d19b99e550fdbc653723e4b13e51ee5 /kernel/exit.c | |
| parent | 4b6ba8aacbb3185703b797286547d0f8f3859b02 (diff) | |
| parent | 90a8a73c06cc32b609a880d48449d7083327e11a (diff) | |
Merge commit 'v2.6.37-rc7' into devicetree/next
Diffstat (limited to 'kernel/exit.c')
| -rw-r--r-- | kernel/exit.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index b194febf5799..676149a4ac5f 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -96,6 +96,14 @@ static void __exit_signal(struct task_struct *tsk) sig->tty = NULL; } else { /* + * This can only happen if the caller is de_thread(). + * FIXME: this is the temporary hack, we should teach + * posix-cpu-timers to handle this case correctly. + */ + if (unlikely(has_group_leader_pid(tsk))) + posix_cpu_timers_exit_group(tsk); + + /* * If there is any task waiting for the group exit * then notify it: */ @@ -906,6 +914,15 @@ NORET_TYPE void do_exit(long code) if (unlikely(!tsk->pid)) panic("Attempted to kill the idle task!"); + /* + * If do_exit is called because this processes oopsed, it's possible + * that get_fs() was left as KERNEL_DS, so reset it to USER_DS before + * continuing. Amongst other possible reasons, this is to prevent + * mm_release()->clear_child_tid() from writing to a user-controlled + * kernel address. + */ + set_fs(USER_DS); + tracehook_report_exit(&code); validate_creds_for_do_exit(tsk); |
