sched: Fix runnable condition for stoptask
authorPeter Zijlstra <a.p.zijlstra@chello.nl>
Tue, 9 Nov 2010 13:36:52 +0000 (14:36 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 10 Nov 2010 22:13:58 +0000 (23:13 +0100)
commit2d46709082c062cae7cce1a15f8cd4cd81b92d88
tree8222a0f18aca8a91c7929264d83bf6010a905993
parentaae6d3ddd8b90f5b2c8d79a2b914d1706d124193
sched: Fix runnable condition for stoptask

Heiko reported that the TASK_RUNNING check is not sufficient for
CONFIG_PREEMPT=y since we can get preempted with !TASK_RUNNING.

He suggested adding a ->se.on_rq test to the existing TASK_RUNNING
one, however TASK_RUNNING will always have ->se.on_rq, so we might as
well reduce that to a single test.

[ stop tasks should never get preempted, but its good to handle
  this case correctly should this ever happen ]

Reported-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/sched_stoptask.c
This page took 0.038933 seconds and 5 git commands to generate.