lkml.org 
[lkml]   [2022]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 6/6] mm: shrinkers: add scan interface for shrinker debugfs
On Wed, 1 Jun 2022 17:56:22 -0700 Roman Gushchin <roman.gushchin@linux.dev> wrote:

> >
> > > + ssize_t ret;
> > > +
> > > + if (copy_from_user(kbuf, buf, read_len))
> > > + return -EFAULT;
> > > + kbuf[read_len] = '\0';
> > > +
> > > + if (sscanf(kbuf, "%lu %d %lu", &ino, &nid, &nr_to_scan) < 2)
> >
> > Was it intentional to permit more than three args?
>
> Good catch! No, of course it wasn't intentional.
>
> Below is an updated version of this patch.
>
> ...
>
> + if (sscanf(kbuf, "%lu %d %lu", &ino, &nid, &nr_to_scan) != 2)
> + return -EINVAL;

s/2/3/methinks?


\
 
 \ /
  Last update: 2022-06-02 20:43    [W:0.103 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site