Re: [Qemu-block] [PATCH] throttle: Assert that bkt->max is valid in throttle_compute_wait()

2017-09-18 Thread Kevin Wolf
Am 13.09.2017 um 10:28 hat Alberto Garcia geschrieben: > If bkt->max == 0 and bkt->burst_length > 1 then we could have a > division by 0 in throttle_do_compute_wait(). That configuration is > however not permitted and is already detected by throttle_is_valid(), > but let's assert it in throttle_com

[Qemu-block] [PATCH] throttle: Assert that bkt->max is valid in throttle_compute_wait()

2017-09-13 Thread Alberto Garcia
If bkt->max == 0 and bkt->burst_length > 1 then we could have a division by 0 in throttle_do_compute_wait(). That configuration is however not permitted and is already detected by throttle_is_valid(), but let's assert it in throttle_compute_wait() to make it explicit. Found by Coverity (CID: 13810