]> Pileus Git - ~andy/linux/blobdiff - fs/drop_caches.c
sysctl: add some missing input constraint checks
[~andy/linux] / fs / drop_caches.c
index 2195c213ab2f556b1aecf106ffa693c2249f850a..816f88e6b9ceaa08c8ff443e3e54035c567b3a2e 100644 (file)
@@ -45,7 +45,11 @@ static void drop_slab(void)
 int drop_caches_sysctl_handler(ctl_table *table, int write,
        void __user *buffer, size_t *length, loff_t *ppos)
 {
-       proc_dointvec_minmax(table, write, buffer, length, ppos);
+       int ret;
+
+       ret = proc_dointvec_minmax(table, write, buffer, length, ppos);
+       if (ret)
+               return ret;
        if (write) {
                if (sysctl_drop_caches & 1)
                        iterate_supers(drop_pagecache_sb, NULL);