Skip to content

Commit

Permalink
sched: Fix the task-group check in tg_has_rt_tasks()
Browse files Browse the repository at this point in the history
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@redhat.com>
Reviewed-by: Kirill Tkhai <ktkhai@parallels.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Mike Galbraith <umgwanakikbuti@gmail.com>
Link: http://lkml.kernel.org/r/20140921193336.GA28618@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Oleg Nesterov authored and Ingo Molnar committed Sep 24, 2014
1 parent 83a0a96 commit 8651c65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 8651c65

Please sign in to comment.