diff options
Diffstat (limited to 'kernel/sched_rt.c')
-rw-r--r-- | kernel/sched_rt.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c index bf3e38fdbe6d..b5b920ae2ea7 100644 --- a/kernel/sched_rt.c +++ b/kernel/sched_rt.c | |||
@@ -1146,7 +1146,12 @@ static struct task_struct *pick_next_highest_task_rt(struct rq *rq, int cpu) | |||
1146 | if (next && next->prio < idx) | 1146 | if (next && next->prio < idx) |
1147 | continue; | 1147 | continue; |
1148 | list_for_each_entry(rt_se, array->queue + idx, run_list) { | 1148 | list_for_each_entry(rt_se, array->queue + idx, run_list) { |
1149 | struct task_struct *p = rt_task_of(rt_se); | 1149 | struct task_struct *p; |
1150 | |||
1151 | if (!rt_entity_is_task(rt_se)) | ||
1152 | continue; | ||
1153 | |||
1154 | p = rt_task_of(rt_se); | ||
1150 | if (pick_rt_task(rq, p, cpu)) { | 1155 | if (pick_rt_task(rq, p, cpu)) { |
1151 | next = p; | 1156 | next = p; |
1152 | break; | 1157 | break; |
@@ -1662,8 +1667,9 @@ static void watchdog(struct rq *rq, struct task_struct *p) | |||
1662 | if (!p->signal) | 1667 | if (!p->signal) |
1663 | return; | 1668 | return; |
1664 | 1669 | ||
1665 | soft = p->signal->rlim[RLIMIT_RTTIME].rlim_cur; | 1670 | /* max may change after cur was read, this will be fixed next tick */ |
1666 | hard = p->signal->rlim[RLIMIT_RTTIME].rlim_max; | 1671 | soft = task_rlimit(p, RLIMIT_RTTIME); |
1672 | hard = task_rlimit_max(p, RLIMIT_RTTIME); | ||
1667 | 1673 | ||
1668 | if (soft != RLIM_INFINITY) { | 1674 | if (soft != RLIM_INFINITY) { |
1669 | unsigned long next; | 1675 | unsigned long next; |