Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

sched: fix invalid pointer in dec_rt_prio().

rt_rq was invalidated by the call to for_each_leaf_rt_rq(); add an
iterator rt_rq.
  • Loading branch information...
commit 635b2ce511e68bfe33890b34d77a9c97755fca8c 1 parent 66ba720
@aparri aparri authored committed
Showing with 4 additions and 3 deletions.
  1. +4 −3 kernel/sched/rt.c
View
7 kernel/sched/rt.c
@@ -1471,6 +1471,7 @@ dec_rt_prio(struct rt_rq *rt_rq, int prio)
{
int prev_prio = rt_rq->highest_prio;
struct rq *rq = rq_of_rt_rq(rt_rq);
+ struct rt_rq *iter;
if (rt_rq->rt_nr_running) {
@@ -1494,9 +1495,9 @@ dec_rt_prio(struct rt_rq *rt_rq, int prio)
if (prio == prev_prio) {
prio = MAX_RT_PRIO;
- for_each_leaf_rt_rq(rt_rq, rq) {
- if (rt_rq->highest_prio < prio)
- prio = rt_rq->highest_prio;
+ for_each_leaf_rt_rq(iter, rq) {
+ if (iter->highest_prio < prio)
+ prio = iter->highest_prio;
}
rq->rt.highest_prio.curr = prio;
}
Please sign in to comment.
Something went wrong with that request. Please try again.