summaryrefslogtreecommitdiffstats
path: root/kernel/sched/fair.c
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@cmpxchg.org>2019-12-03 13:35:24 -0500
committerPeter Zijlstra <peterz@infradead.org>2019-12-17 13:32:48 +0100
commitc3466952ca1514158d7c16c9cfc48c27d5c5dc0f (patch)
tree2c5ed57633fc8461c1ba1c938e271c1f137bd8ae /kernel/sched/fair.c
parent3dfbe25c27eab7c90c8a7e97b4c354a9d24dd985 (diff)
downloadlinux-stable-c3466952ca1514158d7c16c9cfc48c27d5c5dc0f.tar.gz
linux-stable-c3466952ca1514158d7c16c9cfc48c27d5c5dc0f.tar.bz2
linux-stable-c3466952ca1514158d7c16c9cfc48c27d5c5dc0f.zip
psi: Fix a division error in psi poll()
The psi window size is a u64 an can be up to 10 seconds right now, which exceeds the lower 32 bits of the variable. We currently use div_u64 for it, which is meant only for 32-bit divisors. The result is garbage pressure sampling values and even potential div0 crashes. Use div64_u64. Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Cc: Jingfeng Xie <xiejingfeng@linux.alibaba.com> Link: https://lkml.kernel.org/r/20191203183524.41378-3-hannes@cmpxchg.org
Diffstat (limited to 'kernel/sched/fair.c')
0 files changed, 0 insertions, 0 deletions