Huaixin Chang
9fa3b0bd99
sched: Defend cfs and rt bandwidth quota against overflow
...
[ Upstream commit d505b8af58912ae1e1a211fabc9995b19bd40828 ]
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 <changhuaixin@linux.alibaba.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Ben Segall <bsegall@google.com>
Link: https://lkml.kernel.org/r/20200425105248.60093-1-changhuaixin@linux.alibaba.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-06-22 09:31:07 +02:00
..
autogroup.c
sched/autogroup: Make autogroup_path() always available
2019-06-24 19:23:40 +02:00
autogroup.h
clock.c
completion.c
core.c
sched: Defend cfs and rt bandwidth quota against overflow
2020-06-22 09:31:07 +02:00
cpuacct.c
cpudeadline.c
Linux 5.2-rc5
2019-06-17 12:12:27 +02:00
cpudeadline.h
cpufreq.c
cpufreq: Avoid leaving stale IRQ work items during CPU offline
2019-12-31 16:46:06 +01:00
cpufreq_schedutil.c
cpufreq: Avoid leaving stale IRQ work items during CPU offline
2019-12-31 16:46:06 +01:00
cpupri.c
Linux 5.2-rc5
2019-06-17 12:12:27 +02:00
cpupri.h
cputime.c
sched/vtime: Fix guest/system mis-accounting on task switch
2019-10-09 12:38:03 +02:00
deadline.c
sched/core: Further clarify sched_class::set_next_task()
2020-01-26 10:01:03 +01:00
debug.c
Linux 5.2-rc6
2019-06-24 19:19:53 +02:00
fair.c
sched/fair: Refill bandwidth before scaling
2020-06-22 09:30:51 +02:00
features.h
sched/fair: Replace source_load() & target_load() with weighted_cpuload()
2019-06-03 11:49:39 +02:00
idle.c
sched/core: Further clarify sched_class::set_next_task()
2020-01-26 10:01:03 +01:00
isolation.c
sched/isolation: Prefer housekeeping CPU in local node
2019-07-25 15:51:55 +02:00
loadavg.c
timers/nohz: Update NOHZ load in remote tick
2020-03-05 16:43:36 +01:00
Makefile
membarrier.c
membarrier: Fix RCU locking bug caused by faulty merge
2019-10-01 21:27:50 +02:00
pelt.c
sched/debug: Add new tracepoint to track PELT at se level
2019-06-24 19:23:42 +02:00
pelt.h
sched/topology: Remove unused 'sd' parameter from arch_scale_cpu_capacity()
2019-06-24 19:23:39 +02:00
psi.c
sched/psi: Fix OOB write when writing 0 bytes to PSI files
2020-02-28 17:22:21 +01:00
rt.c
sched: Defend cfs and rt bandwidth quota against overflow
2020-06-22 09:31:07 +02:00
sched-pelt.h
sched/fair: Fix "runnable_avg_yN_inv" not used warnings
2019-06-17 12:15:58 +02:00
sched.h
sched: Defend cfs and rt bandwidth quota against overflow
2020-06-22 09:31:07 +02:00
stats.c
stats.h
sched/stats: Fix unlikely() use of sched_info_on()
2019-07-25 15:51:55 +02:00
stop_task.c
sched/core: Further clarify sched_class::set_next_task()
2020-01-26 10:01:03 +01:00
swait.c
topology.c
sched/topology: Assert non-NUMA topology masks don't (partially) overlap
2020-02-24 08:36:52 +01:00
wait.c
sched/wait: Deduplicate code with do-while
2019-06-24 19:23:40 +02:00
wait_bit.c