diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-12-09 09:32:03 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-09 10:01:07 +0100 |
commit | dba091b9e3522b9d32fc9975e48d3b69633b45f0 (patch) | |
tree | 91549e3921971b6d0074fd34c29223b593381c8a /kernel/sched_idletask.c | |
parent | sched: Protect task->cpus_allowed access in sched_getaffinity() (diff) | |
download | linux-dba091b9e3522b9d32fc9975e48d3b69633b45f0.tar.xz linux-dba091b9e3522b9d32fc9975e48d3b69633b45f0.zip |
sched: Protect sched_rr_get_param() access to task->sched_class
sched_rr_get_param calls
task->sched_class->get_rr_interval(task) without protection
against a concurrent sched_setscheduler() call which modifies
task->sched_class.
Serialize the access with task_rq_lock(task) and hand the rq
pointer into get_rr_interval() as it's needed at least in the
sched_fair implementation.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
LKML-Reference: <alpine.LFD.2.00.0912090930120.3089@localhost.localdomain>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched_idletask.c')
-rw-r--r-- | kernel/sched_idletask.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_idletask.c b/kernel/sched_idletask.c index b133a28fcde3..33d5384a73a8 100644 --- a/kernel/sched_idletask.c +++ b/kernel/sched_idletask.c @@ -97,7 +97,7 @@ static void prio_changed_idle(struct rq *rq, struct task_struct *p, check_preempt_curr(rq, p, 0); } -unsigned int get_rr_interval_idle(struct task_struct *task) +unsigned int get_rr_interval_idle(struct rq *rq, struct task_struct *task) { return 0; } |