Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blk-throttle: check for overflow in calculate_bytes_allowed
commit 2dd710d upstream. Inexact, we may reject some not-overflowing values incorrectly, but they'll be on the order of exabytes allowed anyways. This fixes divide error crash on x86 if bps_limit is not configured or is set too high in the rare case that jiffy_elapsed is greater than HZ. Fixes: e8368b5 ("blk-throttle: use calculate_io/bytes_allowed() for throtl_trim_slice()") Fixes: 8d6bbaa ("blk-throttle: prevent overflow while calculating wait time") Signed-off-by: Khazhismel Kumykov <[email protected]> Acked-by: Tejun Heo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
- Loading branch information