sched: run_posix_cpu_timers: Don't check ->exit_state, use lock_task_sighand()
authorOleg Nesterov <oleg@redhat.com>
Thu, 10 Jun 2010 23:10:18 +0000 (01:10 +0200)
committerIngo Molnar <mingo@elte.hu>
Fri, 18 Jun 2010 08:46:57 +0000 (10:46 +0200)
commit0bdd2ed4138ec04e09b4f8165981efc99e439f55
tree2bac5b05aa0f248b82facc0f2bc0bf705e306e05
parentbfac7009180901f57f20a73c53c3e57b1ce75a1b
sched: run_posix_cpu_timers: Don't check ->exit_state, use lock_task_sighand()

run_posix_cpu_timers() doesn't work if current has already passed
exit_notify(). This was needed to prevent the races with do_wait().

Since ea6d290c ->signal is always valid and can't go away. We can
remove the "tsk->exit_state == 0" in fastpath_timer_check() and
convert run_posix_cpu_timers() to use lock_task_sighand().

Note: it makes sense to take group_leader's sighand instead, the
sub-thread still uses CPU after release_task(). But we need more
changes to do this.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100610231018.GA25942@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/posix-cpu-timers.c