aboutsummaryrefslogtreecommitdiff
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@redhat.com>2009-06-17 16:27:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 13:03:53 -0700
commitf95d39d10fe7d47336e65172f52bf64e0096f983 (patch)
tree14b469b68455968dfd707695083ece72287dfaab /block/cfq-iosched.c
parenta3f6dfb7295facb0505b5beca5a7ce48b0612379 (diff)
do_wait: fix the theoretical race with stop/trace/cont
do_wait: current->state = TASK_INTERRUPTIBLE; read_lock(&tasklist_lock); ... search for the task to reap ... In theory, the ->state changing can leak into the critical section. Since the child can change its status under read_lock(tasklist) in parallel (finish_stop/ptrace_stop), we can miss the wakeup if __wake_up_parent() sees us in TASK_RUNNING state. Add the barrier. Also, use __set_current_state() to set TASK_RUNNING. Signed-off-by: Oleg Nesterov <oleg@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Acked-by: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'block/cfq-iosched.c')
0 files changed, 0 insertions, 0 deletions