lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + sysctl-return-einval-if-val-violates-minmax.patch added to -mm tree
On Mon, Feb 11, 2019 at 10:19:19PM +0100, Christian Brauner wrote:
> On Tue, Feb 12, 2019 at 12:17:16AM +0300, Alexey Dobriyan wrote:
> > On Mon, Feb 11, 2019 at 01:06:32PM -0800, akpm@linux-foundation.org wrote:
> >
> > > @@ -2848,8 +2848,10 @@ static int __do_proc_doulongvec_minmax(v
> >
> > > - if ((min && val < *min) || (max && val > *max))
> > > - continue;
> > > + if ((min && val < *min) || (max && val > *max)) {
> > > + err = -EINVAL;
> >
> > I was asked to return ERANGE in kstrto*().
>
> I think we discussed ERANGE vs EINVAL and decided EINVAL because there
> was precedence for other sysctls already.

Can you do a proper audit and see?

linux-api folks may care.

Luis

\
 
 \ /
  Last update: 2019-02-11 22:26    [W:0.030 / U:2.428 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site