android_kernel_samsung_a7y1.../kernel/sched
Konstantin Khlebnikov fa6ad3acff sched/core: Handle overflow in cpu_shares_write_u64
[ Upstream commit 5b61d50ab4ef590f5e1d4df15cd2cea5f5715308 ]

Bit shift in scale_load() could overflow shares. This patch saturates
it to MAX_SHARES like following sched_group_set_shares().

Example:

 # echo 9223372036854776832 > cpu.shares
 # cat cpu.shares

Before patch: 1024
After pattch: 262144

Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/155125501891.293431.3345233332801109696.stgit@buzz
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-04-06 18:18:55 +02:00
..
auto_group.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
auto_group.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
clock.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
completion.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
core.c sched/core: Handle overflow in cpu_shares_write_u64 2020-04-06 18:18:55 +02:00
cpuacct.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpuacct.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpudeadline.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpudeadline.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq_schedutil.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpufreq.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpupri.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cpupri.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
cputime.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
deadline.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
debug.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
energy.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
fair.c sched/numa: Fix a possible divide-by-zero 2020-04-06 16:38:43 +02:00
features.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idle_task.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
idle.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
loadavg.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
Makefile A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
rt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
sched.h sched: Add sched_smt_active() 2020-04-06 16:51:01 +02:00
stats.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stats.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
stop_task.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tune.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
tune.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
wait.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
walt.c A750FXXU4CTBC 2020-03-27 21:51:54 +05:30
walt.h A750FXXU4CTBC 2020-03-27 21:51:54 +05:30