diff options
author | Rik van Riel <[email protected]> | 2014-05-06 12:50:01 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-05-06 13:04:58 -0700 |
commit | d5c9fde3dae750889168807038243ff36431d276 (patch) | |
tree | 8b57ac0da7278daae45c9b7ac87a6bec7a554983 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 457c1b27ed56ec472d202731b12417bff023594a (diff) |
mm/page-writeback.c: fix divide by zero in pos_ratio_polynom
It is possible for "limit - setpoint + 1" to equal zero, after getting
truncated to a 32 bit variable, and resulting in a divide by zero error.
Using the fully 64 bit divide functions avoids this problem. It also
will cause pos_ratio_polynom() to return the correct value when
(setpoint - limit) exceeds 2^32.
Also uninline pos_ratio_polynom, at Andrew's request.
Signed-off-by: Rik van Riel <[email protected]>
Reviewed-by: Michal Hocko <[email protected]>
Cc: Aneesh Kumar K.V <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Nishanth Aravamudan <[email protected]>
Cc: Luiz Capitulino <[email protected]>
Cc: Masayoshi Mizuma <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions