[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20200424095502.0063e857@gandalf.local.home>
Date: Fri, 24 Apr 2020 09:55:02 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: Hillf Danton <hdanton@...a.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
lkml <linux-kernel@...r.kernel.org>,
Mike Galbraith <efault@....de>,
Mel Gorman <mgorman@...hsingularity.net>,
Vincent Guittot <vincent.guittot@...aro.org>,
Phil Auld <pauld@...hat.com>,
Valentin Schneider <valentin.schneider@....com>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Mark Rutland <mark.rutland@....com>
Subject: Re: [PATCH 1/4] sched: set p->prio reguardless of p->mm
On Fri, 24 Apr 2020 12:30:41 +0800
Hillf Danton <hdanton@...a.com> wrote:
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -4795,14 +4795,6 @@ recheck:
> if (attr->sched_flags & ~(SCHED_FLAG_ALL | SCHED_FLAG_SUGOV))
> return -EINVAL;
>
> - /*
> - * Valid priorities for SCHED_FIFO and SCHED_RR are
> - * 1..MAX_USER_RT_PRIO-1, valid priority for SCHED_NORMAL,
> - * SCHED_BATCH and SCHED_IDLE is 0.
> - */
> - if ((p->mm && attr->sched_priority > MAX_USER_RT_PRIO-1) ||
> - (!p->mm && attr->sched_priority > MAX_RT_PRIO-1))
> - return -EINVAL;
So if someone passes in sched_priority > MAX_RT_PRIO-1, where does it get
checked?
-- Steve
> if ((dl_policy(policy) && !__checkparam_dl(attr)) ||
> (rt_policy(policy) != (attr->sched_priority != 0)))
> return -EINVAL;
Powered by blists - more mailing lists