aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 546774a31a66..1295e0917516 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -69,7 +69,9 @@ static void __unhash_process(struct task_struct *p)
69 69
70 list_del_rcu(&p->tasks); 70 list_del_rcu(&p->tasks);
71 list_del_init(&p->sibling); 71 list_del_init(&p->sibling);
72 preempt_disable();
72 __get_cpu_var(process_counts)--; 73 __get_cpu_var(process_counts)--;
74 preempt_enable();
73 } 75 }
74 list_del_rcu(&p->thread_group); 76 list_del_rcu(&p->thread_group);
75} 77}
@@ -131,7 +133,7 @@ static void __exit_signal(struct task_struct *tsk)
131 * Do this under ->siglock, we can race with another thread 133 * Do this under ->siglock, we can race with another thread
132 * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals. 134 * doing sigqueue_free() if we have SIGQUEUE_PREALLOC signals.
133 */ 135 */
134 flush_sigqueue(&tsk->pending); 136 flush_task_sigqueue(tsk);
135 137
136 tsk->signal = NULL; 138 tsk->signal = NULL;
137 tsk->sighand = NULL; 139 tsk->sighand = NULL;
@@ -686,9 +688,11 @@ static void exit_mm(struct task_struct * tsk)
686 task_lock(tsk); 688 task_lock(tsk);
687 tsk->mm = NULL; 689 tsk->mm = NULL;
688 up_read(&mm->mmap_sem); 690 up_read(&mm->mmap_sem);
691 preempt_disable(); // FIXME
689 enter_lazy_tlb(mm, current); 692 enter_lazy_tlb(mm, current);
690 /* We don't want this task to be frozen prematurely */ 693 /* We don't want this task to be frozen prematurely */
691 clear_freeze_flag(tsk); 694 clear_freeze_flag(tsk);
695 preempt_enable();
692 task_unlock(tsk); 696 task_unlock(tsk);
693 mm_update_next_owner(mm); 697 mm_update_next_owner(mm);
694 mmput(mm); 698 mmput(mm);
@@ -1493,6 +1497,9 @@ static int wait_consider_task(struct wait_opts *wo, int ptrace,
1493 struct task_struct *p) 1497 struct task_struct *p)
1494{ 1498{
1495 int ret = eligible_child(wo, p); 1499 int ret = eligible_child(wo, p);
1500
1501 BUG_ON(!atomic_read(&p->usage));
1502
1496 if (!ret) 1503 if (!ret)
1497 return ret; 1504 return ret;
1498 1505