Files
kernel_google_b1c1/kernel
Konstantin Khlebnikov c58f0e847b 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>
2019-05-31 06:48:22 -07:00
..
2019-05-16 19:43:40 +02:00
2017-09-02 07:07:53 +02:00
2019-05-31 06:48:20 -07:00
2019-01-13 10:03:51 +01:00
2018-08-03 07:55:12 +02:00
2017-05-20 14:28:40 +02:00
2018-08-03 07:55:24 +02:00
2018-05-09 09:50:20 +02:00