From: Kevin Wolf <kwolf@redhat.com>
To: Alberto Garcia <berto@igalia.com>
Cc: qemu-devel@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>,
qemu-block@nongnu.org, Peter Maydell <peter.maydell@linaro.org>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH] throttle: Assert that bkt->max is valid in throttle_compute_wait()
Date: Mon, 18 Sep 2017 11:58:56 +0200 [thread overview]
Message-ID: <20170918095856.GF31915@localhost.localdomain> (raw)
In-Reply-To: <20170913082817.24731-1-berto@igalia.com>
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_compute_wait() to make it explicit.
>
> Found by Coverity (CID: 1381016).
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
Thanks, applied to the block branch.
Kevin
prev parent reply other threads:[~2017-09-18 9:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-13 8:28 [Qemu-devel] [PATCH] throttle: Assert that bkt->max is valid in throttle_compute_wait() Alberto Garcia
2017-09-13 13:54 ` Eric Blake
2017-09-13 16:31 ` Philippe Mathieu-Daudé
2017-09-14 9:00 ` Alberto Garcia
2017-09-18 9:58 ` Kevin Wolf [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170918095856.GF31915@localhost.localdomain \
--to=kwolf@redhat.com \
--cc=berto@igalia.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).