aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorJeremy Erickson <jerickso@cs.unc.edu>2014-04-11 13:24:45 -0400
committerJeremy Erickson <jerickso@cs.unc.edu>2014-04-11 13:24:45 -0400
commit438145c7ef5c9445f25bb8fc4d52e2c9d11fdc7c (patch)
tree76941991e36f4a32bf1be0db3854959053f24619 /kernel/exit.c
parent9ddd1b8ad8abd321964b8add5581910de6d67c2a (diff)
Update from 2.6.36 to 2.6.36.4wip-dissipation-jerickso
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index b9d3bc6c21ec..ad7e51488291 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -97,6 +97,14 @@ static void __exit_signal(struct task_struct *tsk)
97 sig->tty = NULL; 97 sig->tty = NULL;
98 } else { 98 } else {
99 /* 99 /*
100 * This can only happen if the caller is de_thread().
101 * FIXME: this is the temporary hack, we should teach
102 * posix-cpu-timers to handle this case correctly.
103 */
104 if (unlikely(has_group_leader_pid(tsk)))
105 posix_cpu_timers_exit_group(tsk);
106
107 /*
100 * If there is any task waiting for the group exit 108 * If there is any task waiting for the group exit
101 * then notify it: 109 * then notify it:
102 */ 110 */
@@ -905,6 +913,15 @@ NORET_TYPE void do_exit(long code)
905 if (unlikely(!tsk->pid)) 913 if (unlikely(!tsk->pid))
906 panic("Attempted to kill the idle task!"); 914 panic("Attempted to kill the idle task!");
907 915
916 /*
917 * If do_exit is called because this processes oopsed, it's possible
918 * that get_fs() was left as KERNEL_DS, so reset it to USER_DS before
919 * continuing. Amongst other possible reasons, this is to prevent
920 * mm_release()->clear_child_tid() from writing to a user-controlled
921 * kernel address.
922 */
923 set_fs(USER_DS);
924
908 tracehook_report_exit(&code); 925 tracehook_report_exit(&code);
909 926
910 validate_creds_for_do_exit(tsk); 927 validate_creds_for_do_exit(tsk);