diff options
| -rw-r--r-- | kernel/sched/core.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index cdefcf7c5925..f3f08bf94355 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -3713,7 +3713,7 @@ SYSCALL_DEFINE1(sched_getscheduler, pid_t, pid) | |||
| 3713 | */ | 3713 | */ |
| 3714 | SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) | 3714 | SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) |
| 3715 | { | 3715 | { |
| 3716 | struct sched_param lp; | 3716 | struct sched_param lp = { .sched_priority = 0 }; |
| 3717 | struct task_struct *p; | 3717 | struct task_struct *p; |
| 3718 | int retval; | 3718 | int retval; |
| 3719 | 3719 | ||
| @@ -3730,11 +3730,8 @@ SYSCALL_DEFINE2(sched_getparam, pid_t, pid, struct sched_param __user *, param) | |||
| 3730 | if (retval) | 3730 | if (retval) |
| 3731 | goto out_unlock; | 3731 | goto out_unlock; |
| 3732 | 3732 | ||
| 3733 | if (task_has_dl_policy(p)) { | 3733 | if (task_has_rt_policy(p)) |
| 3734 | retval = -EINVAL; | 3734 | lp.sched_priority = p->rt_priority; |
| 3735 | goto out_unlock; | ||
| 3736 | } | ||
| 3737 | lp.sched_priority = p->rt_priority; | ||
| 3738 | rcu_read_unlock(); | 3735 | rcu_read_unlock(); |
| 3739 | 3736 | ||
| 3740 | /* | 3737 | /* |
