diff options
author | Khazhismel Kumykov <[email protected]> | 2023-10-20 15:36:17 -0700 |
---|---|---|
committer | Jens Axboe <[email protected]> | 2023-10-20 18:38:17 -0600 |
commit | 2dd710d476f2f1f6eaca884f625f69ef4389ed40 (patch) | |
tree | bcb7b766b44f98e9223d099700c3b986c6d2e92c /lib/test_fortify/write_overflow-strncpy.c | |
parent | c3414550cb0d4dfad1816ee14ff1f44819d270db (diff) |
blk-throttle: check for overflow in calculate_bytes_allowed
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: e8368b57c006 ("blk-throttle: use calculate_io/bytes_allowed() for throtl_trim_slice()")
Fixes: 8d6bbaada2e0 ("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]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy.c')
0 files changed, 0 insertions, 0 deletions