Merge branch 'core-watchdog-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / kernel / sysctl.c
index 4c08ed4a379e35577bae2ce2cb7e9ac9a1d89e8e..d9c31bc2eaea2c95a7a7be5a5321700b84d8f640 100644 (file)
@@ -367,7 +367,8 @@ static struct ctl_table kern_table[] = {
                .data           = &sysctl_sched_time_avg,
                .maxlen         = sizeof(unsigned int),
                .mode           = 0644,
-               .proc_handler   = proc_dointvec,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &one,
        },
 #ifdef CONFIG_SCHEDSTATS
        {
@@ -2181,8 +2182,6 @@ static int do_proc_douintvec_conv(unsigned long *lvalp,
                                  int write, void *data)
 {
        if (write) {
-               if (*lvalp > UINT_MAX)
-                       return -EINVAL;
                if (*lvalp > UINT_MAX)
                        return -EINVAL;
                *valp = *lvalp;