]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mm-shrinkers-add-scan-interface-for-shrinker-debugfs-fix-fix
authorAndrew Morton <akpm@linux-foundation.org>
Thu, 2 Jun 2022 18:41:39 +0000 (11:41 -0700)
committerLiam R. Howlett <Liam.Howlett@oracle.com>
Wed, 20 Jul 2022 00:15:03 +0000 (20:15 -0400)
fix arg count checking

Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Cc: Dave Chinner <dchinner@redhat.com>
Cc: Hillf Danton <hdanton@sina.com>
Cc: Kent Overstreet <kent.overstreet@gmail.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/shrinker_debug.c

index 12026472daaecefa5aecb7df16827b2fed93c7d9..e5b40c43221d07a335f900cd7ea6df54535a3134 100644 (file)
@@ -124,7 +124,7 @@ static ssize_t shrinker_debugfs_scan_write(struct file *file,
                return -EFAULT;
        kbuf[read_len] = '\0';
 
-       if (sscanf(kbuf, "%lu %d %lu", &ino, &nid, &nr_to_scan) != 2)
+       if (sscanf(kbuf, "%lu %d %lu", &ino, &nid, &nr_to_scan) != 3)
                return -EINVAL;
 
        if (nid < 0 || nid >= nr_node_ids)