diff options
author | Huaixin Chang <[email protected]> | 2020-04-25 18:52:48 +0800 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2020-05-19 20:34:14 +0200 |
commit | d505b8af58912ae1e1a211fabc9995b19bd40828 (patch) | |
tree | d3eb4c4bd5d8670ee6aaaa56993a8ed366160de7 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | dbe9337109c2705f08e6a00392f991eb2d2570a5 (diff) |
sched: Defend cfs and rt bandwidth quota against overflow
When users write some huge number into cpu.cfs_quota_us or
cpu.rt_runtime_us, overflow might happen during to_ratio() shifts of
schedulable checks.
to_ratio() could be altered to avoid unnecessary internal overflow, but
min_cfs_quota_period is less than 1 << BW_SHIFT, so a cutoff would still
be needed. Set a cap MAX_BW for cfs_quota_us and rt_runtime_us to
prevent overflow.
Signed-off-by: Huaixin Chang <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Ben Segall <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions