On Wed, Jul 05, 2017 at 09:59:00AM +0100, Juri Lelli wrote:
> @@ -4065,6 +4067,9 @@ static int __sched_setscheduler(struct task_struct *p,
> }
>
> if (user) {
> + if (attr->sched_flags & SCHED_FLAG_SPECIAL)
> + return -EPERM;Should be -EINVAL I think, as if the bit didn't exist at all (it doesn't, from a userspace perspective). > + > retval = security_task_setscheduler(p); > if (retval) > return retval;

