Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178020
b: refs/heads/master
c: 5fe85be
h: refs/heads/master
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Dec 14, 2009
1 parent acbbd1f commit 436eb02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 663997d417330a59a566452f52cfa04c8ffd190b
refs/heads/master: 5fe85be081edf0ac92d83f9c39e0ab5c1371eb82
10 changes: 5 additions & 5 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -6458,15 +6458,15 @@ SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid)
return -EINVAL;

retval = -ESRCH;
read_lock(&tasklist_lock);
rcu_read_lock();
p = find_process_by_pid(pid);
if (p) {
retval = security_task_getscheduler(p);
if (!retval)
retval = p->policy
| (p->sched_reset_on_fork ? SCHED_RESET_ON_FORK : 0);
}
read_unlock(&tasklist_lock);
rcu_read_unlock();
return retval;
}

Expand All @@ -6484,7 +6484,7 @@ SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
if (!param || pid < 0)
return -EINVAL;

read_lock(&tasklist_lock);
rcu_read_lock();
p = find_process_by_pid(pid);
retval = -ESRCH;
if (!p)
Expand All @@ -6495,7 +6495,7 @@ SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
goto out_unlock;

lp.sched_priority = p->rt_priority;
read_unlock(&tasklist_lock);
rcu_read_unlock();

/*
* This one might sleep, we cannot do it with a spinlock held ...
Expand All @@ -6505,7 +6505,7 @@ SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param)
return retval;

out_unlock:
read_unlock(&tasklist_lock);
rcu_read_unlock();
return retval;
}

Expand Down

0 comments on commit 436eb02

Please sign in to comment.