diff options
| author | Tejun Heo <tj@kernel.org> | 2020-09-11 18:40:49 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2020-09-11 16:41:47 -0600 |
| commit | 769b628de0b9a7ab0b81e6eecca5ee7bf66e978d (patch) | |
| tree | 39ebaa9dc4a2a062fe38ea3aebfdce8d1c642cc9 /scripts/stackusage | |
| parent | bcache: use part_[begin|end]_io_acct instead of disk_[begin|end]_io_acct (diff) | |
| download | linux-769b628de0b9a7ab0b81e6eecca5ee7bf66e978d.tar.gz linux-769b628de0b9a7ab0b81e6eecca5ee7bf66e978d.zip | |
blk-iocost: fix divide-by-zero in transfer_surpluses()
Conceptually, root_iocg->hweight_donating must be less than WEIGHT_ONE but
all hweight calculations round up and thus it may end up >= WEIGHT_ONE
triggering divide-by-zero and other issues. Bound the value to avoid
surprises.
Fixes: e08d02aa5fc9 ("blk-iocost: implement Andy's method for donation weight updates")
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions
