diff options
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 788ecce1e0e4..3ee2ae45125f 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -3850,6 +3850,10 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param) | |||
3850 | asmlinkage long sys_sched_setscheduler(pid_t pid, int policy, | 3850 | asmlinkage long sys_sched_setscheduler(pid_t pid, int policy, |
3851 | struct sched_param __user *param) | 3851 | struct sched_param __user *param) |
3852 | { | 3852 | { |
3853 | /* negative values for policy are not valid */ | ||
3854 | if (policy < 0) | ||
3855 | return -EINVAL; | ||
3856 | |||
3853 | return do_sched_setscheduler(pid, policy, param); | 3857 | return do_sched_setscheduler(pid, policy, param); |
3854 | } | 3858 | } |
3855 | 3859 | ||