sched/core: Fix sched_rt_global_validate
authorJuri Lelli <[email protected]>
Tue, 11 Feb 2014 08:24:26 +0000 (09:24 +0100)
committerThomas Gleixner <[email protected]>
Fri, 21 Feb 2014 20:27:10 +0000 (21:27 +0100)
Don't compare sysctl_sched_rt_runtime against sysctl_sched_rt_period if
the former is equal to RUNTIME_INF, otherwise disabling -rt bandwidth
management (with CONFIG_RT_GROUP_SCHED=n) fails.

Cc: Ingo Molnar <[email protected]>
Signed-off-by: Juri Lelli <[email protected]>
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Thomas Gleixner <[email protected]>
kernel/sched/core.c

index 24914488da4156500cf7cdf8b96c298cdb44119e..98d33c105252500cf1064b6672ab02be88321cad 100644 (file)
@@ -7475,7 +7475,8 @@ static int sched_rt_global_validate(void)
        if (sysctl_sched_rt_period <= 0)
                return -EINVAL;
 
-       if (sysctl_sched_rt_runtime > sysctl_sched_rt_period)
+       if ((sysctl_sched_rt_runtime != RUNTIME_INF) &&
+               (sysctl_sched_rt_runtime > sysctl_sched_rt_period))
                return -EINVAL;
 
        return 0;