[tip:sched/core] sched: Fix the task-group check in tg_has_rt_tasks()
From: tip-bot for Oleg Nesterov
Date: Wed Sep 24 2014 - 11:13:56 EST
Commit-ID: 8651c65844e93af44554272b7e0d2b142837b244
Gitweb: http://git.kernel.org/tip/8651c65844e93af44554272b7e0d2b142837b244
Author: Oleg Nesterov <oleg@xxxxxxxxxx>
AuthorDate: Sun, 21 Sep 2014 21:33:36 +0200
Committer: Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Wed, 24 Sep 2014 14:47:00 +0200
sched: Fix the task-group check in tg_has_rt_tasks()
tg_has_rt_tasks() wants to find an RT task in this task_group, but
task_rq(p)->rt.tg wrongly checks the root rt_rq.
Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Reviewed-by: Kirill Tkhai <ktkhai@xxxxxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Mike Galbraith <umgwanakikbuti@xxxxxxxxx>
Link: http://lkml.kernel.org/r/20140921193336.GA28618@xxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
kernel/sched/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 09bde2a..0abfb7e 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7441,7 +7441,7 @@ static inline int tg_has_rt_tasks(struct task_group *tg)
struct task_struct *g, *p;
for_each_process_thread(g, p) {
- if (rt_task(p) && task_rq(p)->rt.tg == tg)
+ if (rt_task(p) && task_group(p) == tg)
return 1;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/