From 638e13ac37a1a89473415f407cbffc1688a20fe2 Mon Sep 17 00:00:00 2001 From: Gautham R Shenoy Date: Mon, 15 Oct 2007 17:00:14 +0200 Subject: [PATCH] sched: fix rt ptracer monopolizing CPU yield() in wait_task_inactive(), can cause a high priority thread to be scheduled back in, and there by loop forever while it is waiting for some lower priority thread which is unfortunately still on the runqueue. Use schedule_timeout_uninterruptible(1) instead. Signed-off-by: Gautham R Shenoy Credit: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Ingo Molnar --- kernel/sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched.c b/kernel/sched.c index 9ac99896db8f..48fc74b6df55 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -1133,7 +1133,7 @@ repeat: * yield - it could be a while. */ if (unlikely(on_rq)) { - yield(); + schedule_timeout_uninterruptible(1); goto repeat; } -- 2.39.5