Commit 22770def authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] setscheduler fix

From: Joe Korty <joe.korty@ccur.com>

task_running(rq,p) is equivalent to (rq->curr == p) only for some
architectures.
parent 8ef1b7ac
...@@ -2184,7 +2184,7 @@ static int setscheduler(pid_t pid, int policy, struct sched_param __user *param) ...@@ -2184,7 +2184,7 @@ static int setscheduler(pid_t pid, int policy, struct sched_param __user *param)
* our priority decreased, or if we are not currently running on * our priority decreased, or if we are not currently running on
* this runqueue and our priority is higher than the current's * this runqueue and our priority is higher than the current's
*/ */
if (rq->curr == p) { if (task_running(rq, p)) {
if (p->prio > oldprio) if (p->prio > oldprio)
resched_task(rq->curr); resched_task(rq->curr);
} else if (p->prio < rq->curr->prio) } else if (p->prio < rq->curr->prio)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment