summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
authorAnton Arapov <anton@redhat.com>2012-06-27 09:05:37 +0200
committerAnton Arapov <anton@redhat.com>2012-06-27 09:05:37 +0200
commitd91eda5d7b0383e6a0c83e0146ff141ff3b1355b (patch)
tree07a568258d104e4cb79176348cd42141f41e592c /kernel/exit.c
parent3d6fafb8cd68b287130dbd5b19fbb5e9bfa32a54 (diff)
downloadkernel-uprobes-d91eda5d7b0383e6a0c83e0146ff141ff3b1355b.tar.gz
kernel-uprobes-d91eda5d7b0383e6a0c83e0146ff141ff3b1355b.tar.xz
kernel-uprobes-d91eda5d7b0383e6a0c83e0146ff141ff3b1355b.zip
fedora kernel: 5290429908ff3ac614a416fab4a6e2f99b759e6bv3.4.4-3
Signed-off-by: Anton Arapov <anton@redhat.com>
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index d8bd3b425fa..36516fc8e17 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -643,6 +643,7 @@ static void exit_mm(struct task_struct * tsk)
mm_release(tsk, mm);
if (!mm)
return;
+ sync_mm_rss(mm);
/*
* Serialize with any possible pending coredump.
* We must hold mmap_sem around checking core_state
@@ -946,11 +947,14 @@ 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.
+ * an exiting task cleaning up the robust pi futexes, and in
+ * task_work_add() to avoid the race with exit_task_work().
*/
smp_mb();
raw_spin_unlock_wait(&tsk->pi_lock);
+ exit_task_work(tsk);
+
exit_irq_thread();
if (unlikely(in_atomic()))