Messages in this thread | | | From | KOSAKI Motohiro <> | Date | Thu, 26 Jan 2012 16:21:30 -0500 | Subject | Re: [BUG] TASK_DEAD task is able to be woken up in special condition |
| |
2012/1/25 Peter Zijlstra <peterz@infradead.org>: > On Wed, 2011-12-28 at 16:07 -0500, KOSAKI Motohiro wrote: >> >> CPU0 CPU1 >> -------------------------------------------------------- >> deactivate_task() >> task->state = TASK_UNINTERRUPTIBLE; >> activate_task() >> rq->nr_uninterruptible--; >> >> schedule() >> deactivate_task() >> rq->nr_uninterruptible++; >> >> > > Hmm, I think you're right, when CPU0 does __sched_setscheduler() on the > task running on CPU1 and CPU1's @task is current. > > I think only __sched_setscheduler() is really a problem, the other > activate/deactivate users not schedule or wakeup are __migrate_task() > and normalize_task(). > > __migrate_task() will only run on tasks that aren't actually running > anywhere so the above scenario can't happen, normalize_task() is never > used on normal systems (sysrq-n). > > So I guess the below cures things and cleans up a bit.. no?
Sorry for the delay. Yeah, I think this should work. (even though I don't understand __migrate_task() detail)
Thank you!
Ack-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |