summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-06-27 11:31:24 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-22 23:57:57 +0400
commited3e694d78cc75fa79bf29698631b146fd27aa35 (patch)
tree97dad6768546b489a3d09c42cef0738b57f4822e /kernel/exit.c
parent67d1214551e800f9fe7dc7c47a346d2df0fafed5 (diff)
downloadop-kernel-dev-ed3e694d78cc75fa79bf29698631b146fd27aa35.zip
op-kernel-dev-ed3e694d78cc75fa79bf29698631b146fd27aa35.tar.gz
move exit_task_work() past exit_files() et.al.
... and get rid of PF_EXITING check in task_work_add(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 2f59cc3..d17f6c4 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -953,14 +953,11 @@ void do_exit(long code)
exit_signals(tsk); /* sets PF_EXITING */
/*
* tsk->flags are checked in the futex code to protect against
- * an exiting task cleaning up the robust pi futexes, and in
- * task_work_add() to avoid the race with exit_task_work().
+ * an exiting task cleaning up the robust pi futexes.
*/
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);
- exit_task_work(tsk);
-
if (unlikely(in_atomic()))
printk(KERN_INFO "note: %s[%d] exited with preempt_count %d\n",
current->comm, task_pid_nr(current),
@@ -995,6 +992,7 @@ void do_exit(long code)
exit_shm(tsk);
exit_files(tsk);
exit_fs(tsk);
+ exit_task_work(tsk);
check_stack_usage();
exit_thread();
OpenPOWER on IntegriCloud