[tip:sched/core] sched: Remove cfs bandwidth period check in tg_set_cfs_period()

From: tip-bot for Kamalesh Babulal
Date: Wed Dec 21 2011 - 06:43:54 EST


Commit-ID: 11534ec5b6cea13ae38d31799d2a5290c5d724af
Gitweb: http://git.kernel.org/tip/11534ec5b6cea13ae38d31799d2a5290c5d724af
Author: Kamalesh Babulal <kamalesh@xxxxxxxxxxxxxxxxxx>
AuthorDate: Sat, 10 Dec 2011 19:29:25 +0530
Committer: Ingo Molnar <mingo@xxxxxxx>
CommitDate: Wed, 21 Dec 2011 10:34:48 +0100

sched: Remove cfs bandwidth period check in tg_set_cfs_period()

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 <kamalesh@xxxxxxxxxxxxxxxxxx>
Acked-by: Paul Turner <pjt@xxxxxxxxxx>
[ammended changelog to mention negative values]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: http://lkml.kernel.org/r/20111210135925.GA14593@xxxxxxxxxxxxxxxxxx
--
kernel/sched/core.c | 3 ---
1 file changed, 3 deletions(-)

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/sched/core.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index dba878c..081ece2 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -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);
}

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/