diff options
author | Johannes Weiner <[email protected]> | 2019-12-03 13:35:24 -0500 |
---|---|---|
committer | Peter Zijlstra <[email protected]> | 2019-12-17 13:32:48 +0100 |
commit | c3466952ca1514158d7c16c9cfc48c27d5c5dc0f (patch) | |
tree | 2c5ed57633fc8461c1ba1c938e271c1f137bd8ae /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | 3dfbe25c27eab7c90c8a7e97b4c354a9d24dd985 (diff) |
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 <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Reviewed-by: Suren Baghdasaryan <[email protected]>
Cc: Jingfeng Xie <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions