|
@@ -6887,6 +6887,8 @@ SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
|
|
|
{
|
|
|
struct task_struct *p;
|
|
|
unsigned int time_slice;
|
|
|
+ unsigned long flags;
|
|
|
+ struct rq *rq;
|
|
|
int retval;
|
|
|
struct timespec t;
|
|
|
|
|
@@ -6903,7 +6905,9 @@ SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid,
|
|
|
if (retval)
|
|
|
goto out_unlock;
|
|
|
|
|
|
- time_slice = p->sched_class->get_rr_interval(p);
|
|
|
+ rq = task_rq_lock(p, &flags);
|
|
|
+ time_slice = p->sched_class->get_rr_interval(rq, p);
|
|
|
+ task_rq_unlock(rq, &flags);
|
|
|
|
|
|
read_unlock(&tasklist_lock);
|
|
|
jiffies_to_timespec(time_slice, &t);
|