diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 258c73c6a2f3..1782beed2fa7 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -6458,7 +6458,7 @@ SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid) | |||
6458 | return -EINVAL; | 6458 | return -EINVAL; |
6459 | 6459 | ||
6460 | retval = -ESRCH; | 6460 | retval = -ESRCH; |
6461 | read_lock(&tasklist_lock); | 6461 | rcu_read_lock(); |
6462 | p = find_process_by_pid(pid); | 6462 | p = find_process_by_pid(pid); |
6463 | if (p) { | 6463 | if (p) { |
6464 | retval = security_task_getscheduler(p); | 6464 | retval = security_task_getscheduler(p); |
@@ -6466,7 +6466,7 @@ SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid) | |||
6466 | retval = p->policy | 6466 | retval = p->policy |
6467 | | (p->sched_reset_on_fork ? SCHED_RESET_ON_FORK : 0); | 6467 | | (p->sched_reset_on_fork ? SCHED_RESET_ON_FORK : 0); |
6468 | } | 6468 | } |
6469 | read_unlock(&tasklist_lock); | 6469 | rcu_read_unlock(); |
6470 | return retval; | 6470 | return retval; |
6471 | } | 6471 | } |
6472 | 6472 | ||
@@ -6484,7 +6484,7 @@ SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) | |||
6484 | if (!param || pid < 0) | 6484 | if (!param || pid < 0) |
6485 | return -EINVAL; | 6485 | return -EINVAL; |
6486 | 6486 | ||
6487 | read_lock(&tasklist_lock); | 6487 | rcu_read_lock(); |
6488 | p = find_process_by_pid(pid); | 6488 | p = find_process_by_pid(pid); |
6489 | retval = -ESRCH; | 6489 | retval = -ESRCH; |
6490 | if (!p) | 6490 | if (!p) |
@@ -6495,7 +6495,7 @@ SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) | |||
6495 | goto out_unlock; | 6495 | goto out_unlock; |
6496 | 6496 | ||
6497 | lp.sched_priority = p->rt_priority; | 6497 | lp.sched_priority = p->rt_priority; |
6498 | read_unlock(&tasklist_lock); | 6498 | rcu_read_unlock(); |
6499 | 6499 | ||
6500 | /* | 6500 | /* |
6501 | * This one might sleep, we cannot do it with a spinlock held ... | 6501 | * This one might sleep, we cannot do it with a spinlock held ... |
@@ -6505,7 +6505,7 @@ SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) | |||
6505 | return retval; | 6505 | return retval; |
6506 | 6506 | ||
6507 | out_unlock: | 6507 | out_unlock: |
6508 | read_unlock(&tasklist_lock); | 6508 | rcu_read_unlock(); |
6509 | return retval; | 6509 | return retval; |
6510 | } | 6510 | } |
6511 | 6511 | ||