|
@@ -3850,6 +3850,10 @@ do_sched_setscheduler(pid_t pid, int policy, struct sched_param __user *param)
|
|
asmlinkage long sys_sched_setscheduler(pid_t pid, int policy,
|
|
asmlinkage long sys_sched_setscheduler(pid_t pid, int policy,
|
|
struct sched_param __user *param)
|
|
struct sched_param __user *param)
|
|
{
|
|
{
|
|
|
|
+ /* negative values for policy are not valid */
|
|
|
|
+ if (policy < 0)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
return do_sched_setscheduler(pid, policy, param);
|
|
return do_sched_setscheduler(pid, policy, param);
|
|
}
|
|
}
|
|
|
|
|