.maxlen         = sizeof(unsigned int),
                .mode           = 0644,
                .proc_handler   = sched_rt_handler,
+               .extra1         = SYSCTL_ONE,
+               .extra2         = SYSCTL_INT_MAX,
        },
        {
                .procname       = "sched_rt_runtime_us",
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = sched_rt_handler,
+               .extra1         = SYSCTL_NEG_ONE,
+               .extra2         = SYSCTL_INT_MAX,
        },
        {
                .procname       = "sched_rr_timeslice_ms",
 #ifdef CONFIG_SYSCTL
 static int sched_rt_global_validate(void)
 {
-       if (sysctl_sched_rt_period <= 0)
-               return -EINVAL;
-
        if ((sysctl_sched_rt_runtime != RUNTIME_INF) &&
                ((sysctl_sched_rt_runtime > sysctl_sched_rt_period) ||
                 ((u64)sysctl_sched_rt_runtime *
        old_period = sysctl_sched_rt_period;
        old_runtime = sysctl_sched_rt_runtime;
 
-       ret = proc_dointvec(table, write, buffer, lenp, ppos);
+       ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
 
        if (!ret && write) {
                ret = sched_rt_global_validate();