From: Juri Lelli <juri.lelli@redhat.com>
To: Yajun Deng <yajun.deng@linux.dev>
Cc: mingo@redhat.com, peterz@infradead.org,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, vschneid@redhat.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] sched/deadline: Use proc_douintvec_minmax() limit minimum value
Date: Thu, 9 Jun 2022 08:28:54 +0200 [thread overview]
Message-ID: <YqGTJsf2R9hBz2bi@localhost.localdomain> (raw)
In-Reply-To: <20220607101807.249965-1-yajun.deng@linux.dev>
Hi,
On 07/06/22 18:18, Yajun Deng wrote:
> sysctl_sched_dl_period_max and sysctl_sched_dl_period_min are unsigned
> integer, but proc_dointvec() wouldn't return error even if we set a
> negative number.
>
> Use proc_douintvec_minmax() instead of proc_dointvec(). Add extra1 for
> sysctl_sched_dl_period_max and extra2 for sysctl_sched_dl_period_min.
>
> It's just an optimization for match data and proc_handler in struct
> ctl_table. The 'if (period < min || period > max)' in __checkparam_dl()
> will work fine even if there hasn't this patch.
>
> v2:
> - update the log message.
>
> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
> ---
Guess I'm not opposed to the change, even if, as the changelog also
says, we should be already checking for sane values.
That said,
Acked-by: Juri Lelli <juri.lelli@redhat.com>
Thanks,
Juri
next prev parent reply other threads:[~2022-06-09 6:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-07 10:18 Yajun Deng
2022-06-08 12:01 ` Daniel Bristot de Oliveira
2022-06-09 6:28 ` Juri Lelli [this message]
2022-06-09 9:58 ` Daniel Bristot de Oliveira
2022-06-13 8:43 ` [tip: sched/core] " tip-bot2 for Yajun Deng
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=YqGTJsf2R9hBz2bi@localhost.localdomain \
--to=juri.lelli@redhat.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=vschneid@redhat.com \
--cc=yajun.deng@linux.dev \
/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
all inboxes | Powered by JetHome®