sched: Remove cfs bandwidth period check in tg_set_cfs_period()
authorKamalesh Babulal <[email protected]>
Sat, 10 Dec 2011 13:59:25 +0000 (19:29 +0530)
committerIngo Molnar <[email protected]>
Wed, 21 Dec 2011 09:34:48 +0000 (10:34 +0100)
Remove cfs bandwidth period check from tg_set_cfs_period.
Invalid bandwidth period's lower/upper limits are denoted
by min_cfs_quota_period/max_cfs_quota_period repsectively,
and are checked against valid period in tg_set_cfs_bandwidth().

As pjt pointed out, negative input will result in very large unsigned
numbers and will be caught by the max allowed period test.

Signed-off-by: Kamalesh Babulal <[email protected]>
Acked-by: Paul Turner <[email protected]>
[ammended changelog to mention negative values]
Signed-off-by: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
--
 kernel/sched/core.c |    3 ---
 1 file changed, 3 deletions(-)

Signed-off-by: Ingo Molnar <[email protected]>
kernel/sched/core.c

index dba878c73a081cbd1781cd9e0aa3bfdb6e4881bb..081ece26803f0f7b3f1894ef0beac500fc2615b3 100644 (file)
@@ -7714,9 +7714,6 @@ int tg_set_cfs_period(struct task_group *tg, long cfs_period_us)
        period = (u64)cfs_period_us * NSEC_PER_USEC;
        quota = tg->cfs_bandwidth.quota;
 
-       if (period <= 0)
-               return -EINVAL;
-
        return tg_set_cfs_bandwidth(tg, period, quota);
 }