|
|
@@ -2559,6 +2559,8 @@ int sched_group_set_rt_runtime(struct task_group *tg, long rt_runtime_us)
|
|
|
rt_runtime = (u64)rt_runtime_us * NSEC_PER_USEC;
|
|
|
if (rt_runtime_us < 0)
|
|
|
rt_runtime = RUNTIME_INF;
|
|
|
+ else if ((u64)rt_runtime_us > U64_MAX / NSEC_PER_USEC)
|
|
|
+ return -EINVAL;
|
|
|
|
|
|
return tg_set_rt_bandwidth(tg, rt_period, rt_runtime);
|
|
|
}
|
|
|
@@ -2579,6 +2581,9 @@ int sched_group_set_rt_period(struct task_group *tg, u64 rt_period_us)
|
|
|
{
|
|
|
u64 rt_runtime, rt_period;
|
|
|
|
|
|
+ if (rt_period_us > U64_MAX / NSEC_PER_USEC)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
rt_period = rt_period_us * NSEC_PER_USEC;
|
|
|
rt_runtime = tg->rt_bandwidth.rt_runtime;
|
|
|
|