kernel/sched.c: fix subtle TASK_RUNNING compare
PATCH 1/1 kernel/sched.c: fix subtle TASK_RUNNING compare
Hi.
This test was depending on TASK_RUNNING being defined as 0.
Signed-off-by Domen Puncer <[email protected]>
kernel/sched.c +2 -1
@@ -2576,7 +2576,8 @@ need_resched_nonpreemptible:* to picking the next task. */ switch_count = &prev->nivcsw; -if (prev->state && !(preempt_count () &PREEMPT_ACTIVE )) { +if (prev->state !=TASK_RUNNING && + !(preempt_count () &PREEMPT_ACTIVE )) { switch_count = &prev->nvcsw;if (unlikely ((prev->state &TASK_INTERRUPTIBLE ) &&unlikely (signal_pending (prev))))
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors