|
@@ -8909,6 +8909,9 @@ static int sched_rt_global_constraints(void)
|
|
u64 rt_runtime, rt_period;
|
|
u64 rt_runtime, rt_period;
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
|
|
+ if (sysctl_sched_rt_period <= 0)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period);
|
|
rt_period = ktime_to_ns(tg->rt_bandwidth.rt_period);
|
|
rt_runtime = tg->rt_bandwidth.rt_runtime;
|
|
rt_runtime = tg->rt_bandwidth.rt_runtime;
|
|
|
|
|
|
@@ -8925,6 +8928,9 @@ static int sched_rt_global_constraints(void)
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
|
|
+ if (sysctl_sched_rt_period <= 0)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
|
|
spin_lock_irqsave(&def_rt_bandwidth.rt_runtime_lock, flags);
|
|
for_each_possible_cpu(i) {
|
|
for_each_possible_cpu(i) {
|
|
struct rt_rq *rt_rq = &cpu_rq(i)->rt;
|
|
struct rt_rq *rt_rq = &cpu_rq(i)->rt;
|