[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YqGTJsf2R9hBz2bi@localhost.localdomain>
Date: Thu, 9 Jun 2022 08:28:54 +0200
From: Juri Lelli <juri.lelli@...hat.com>
To: Yajun Deng <yajun.deng@...ux.dev>
Cc: mingo@...hat.com, peterz@...radead.org, vincent.guittot@...aro.org,
dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
mgorman@...e.de, bristot@...hat.com, vschneid@...hat.com,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] sched/deadline: Use proc_douintvec_minmax() limit
minimum value
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@...ux.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@...hat.com>
Thanks,
Juri
Powered by blists - more mailing lists