diff options
author | Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> | 2011-12-10 08:59:25 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2011-12-21 04:34:48 -0500 |
commit | 11534ec5b6cea13ae38d31799d2a5290c5d724af (patch) | |
tree | 117d554ceed6d9b9d812a943a8ff8c4f12a203e4 /kernel/sched | |
parent | a195f004e9496b4d99f471bb96e0a0c1af080909 (diff) |
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@linux.vnet.ibm.com>
Acked-by: Paul Turner <pjt@google.com>
[ammended changelog to mention negative values]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111210135925.GA14593@linux.vnet.ibm.com
--
kernel/sched/core.c | 3 ---
1 file changed, 3 deletions(-)
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched')
-rw-r--r-- | 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 dba878c73a08..081ece26803f 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) | |||
7714 | period = (u64)cfs_period_us * NSEC_PER_USEC; | 7714 | period = (u64)cfs_period_us * NSEC_PER_USEC; |
7715 | quota = tg->cfs_bandwidth.quota; | 7715 | quota = tg->cfs_bandwidth.quota; |
7716 | 7716 | ||
7717 | if (period <= 0) | ||
7718 | return -EINVAL; | ||
7719 | |||
7720 | return tg_set_cfs_bandwidth(tg, period, quota); | 7717 | return tg_set_cfs_bandwidth(tg, period, quota); |
7721 | } | 7718 | } |
7722 | 7719 | ||