diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/sched/core.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index a6e7470166c7..6edbef296ece 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c | |||
| @@ -3661,13 +3661,14 @@ SYSCALL_DEFINE2(sched_setparam, pid_t, pid, struct sched_param __user *, param) | |||
| 3661 | * @pid: the pid in question. | 3661 | * @pid: the pid in question. |
| 3662 | * @uattr: structure containing the extended parameters. | 3662 | * @uattr: structure containing the extended parameters. |
| 3663 | */ | 3663 | */ |
| 3664 | SYSCALL_DEFINE2(sched_setattr, pid_t, pid, struct sched_attr __user *, uattr) | 3664 | SYSCALL_DEFINE3(sched_setattr, pid_t, pid, struct sched_attr __user *, uattr, |
| 3665 | unsigned int, flags) | ||
| 3665 | { | 3666 | { |
| 3666 | struct sched_attr attr; | 3667 | struct sched_attr attr; |
| 3667 | struct task_struct *p; | 3668 | struct task_struct *p; |
| 3668 | int retval; | 3669 | int retval; |
| 3669 | 3670 | ||
| 3670 | if (!uattr || pid < 0) | 3671 | if (!uattr || pid < 0 || flags) |
| 3671 | return -EINVAL; | 3672 | return -EINVAL; |
| 3672 | 3673 | ||
| 3673 | if (sched_copy_attr(uattr, &attr)) | 3674 | if (sched_copy_attr(uattr, &attr)) |
| @@ -3804,8 +3805,8 @@ err_size: | |||
| 3804 | * @uattr: structure containing the extended parameters. | 3805 | * @uattr: structure containing the extended parameters. |
| 3805 | * @size: sizeof(attr) for fwd/bwd comp. | 3806 | * @size: sizeof(attr) for fwd/bwd comp. |
| 3806 | */ | 3807 | */ |
| 3807 | SYSCALL_DEFINE3(sched_getattr, pid_t, pid, struct sched_attr __user *, uattr, | 3808 | SYSCALL_DEFINE4(sched_getattr, pid_t, pid, struct sched_attr __user *, uattr, |
| 3808 | unsigned int, size) | 3809 | unsigned int, size, unsigned int, flags) |
| 3809 | { | 3810 | { |
| 3810 | struct sched_attr attr = { | 3811 | struct sched_attr attr = { |
| 3811 | .size = sizeof(struct sched_attr), | 3812 | .size = sizeof(struct sched_attr), |
| @@ -3814,7 +3815,7 @@ SYSCALL_DEFINE3(sched_getattr, pid_t, pid, struct sched_attr __user *, uattr, | |||
| 3814 | int retval; | 3815 | int retval; |
| 3815 | 3816 | ||
| 3816 | if (!uattr || pid < 0 || size > PAGE_SIZE || | 3817 | if (!uattr || pid < 0 || size > PAGE_SIZE || |
| 3817 | size < SCHED_ATTR_SIZE_VER0) | 3818 | size < SCHED_ATTR_SIZE_VER0 || flags) |
| 3818 | return -EINVAL; | 3819 | return -EINVAL; |
| 3819 | 3820 | ||
| 3820 | rcu_read_lock(); | 3821 | rcu_read_lock(); |
