Commit 0dc6c39e authored by Thomas Gleixner's avatar Thomas Gleixner

kthreads: fix softirq startup hang

In -rt where the timer softirq is forced threaded the
schedule_timeout_uninterruptible() might never return when the timer
softirq has not been started yet. Use schedule_hrtimeout() instead
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
parent b55d9725
......@@ -2156,7 +2156,10 @@ unsigned long wait_task_inactive(struct task_struct *p, long match_state)
* yield - it could be a while.
*/
if (unlikely(on_rq)) {
schedule_timeout_uninterruptible(1);
ktime_t to = ktime_set(0, NSEC_PER_SEC/HZ);
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_hrtimeout(&to, HRTIMER_MODE_REL);
continue;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment