linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hillf Danton <hdanton@sina.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Mike Galbraith <efault@gmx.de>,
	Mel Gorman <mgorman@techsingularity.net>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Phil Auld <pauld@redhat.com>,
	Valentin Schneider <valentin.schneider@arm.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 1/4] sched: set p->prio reguardless of p->mm
Date: Fri, 24 Apr 2020 09:55:02 -0400	[thread overview]
Message-ID: <20200424095502.0063e857@gandalf.local.home> (raw)
In-Reply-To: <20200424043041.15084-1-hdanton@sina.com>

On Fri, 24 Apr 2020 12:30:41 +0800
Hillf Danton <hdanton@sina.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;

       reply	other threads:[~2020-04-24 13:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200424041832.11364-1-hdanton@sina.com>
     [not found] ` <20200424043041.15084-1-hdanton@sina.com>
2020-04-24 13:55   ` Steven Rostedt [this message]
     [not found] ` <20200424043650.14940-1-hdanton@sina.com>
2020-04-28 16:32   ` [PATCH 2/4] sched: set new prio after checking schedule policy Valentin Schneider
     [not found]   ` <20200430121301.3460-1-hdanton@sina.com>
2020-04-30 14:06     ` Dietmar Eggemann
2020-04-30 14:18       ` Valentin Schneider
2020-04-30 15:13         ` Valentin Schneider

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200424095502.0063e857@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=dietmar.eggemann@arm.com \
    --cc=efault@gmx.de \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@kernel.org \
    --cc=pauld@redhat.com \
    --cc=peterz@infradead.org \
    --cc=valentin.schneider@arm.com \
    --cc=vincent.guittot@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).