diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-09-29 18:18:28 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-09-29 18:18:29 +0100 |
commit | b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf (patch) | |
tree | df518fd99409be22df46188174833b5fd317be5f /hw | |
parent | 70556264a89a268efba1d7e8e341adcdd7881eb4 (diff) | |
parent | a631892f9d6440812af98588e9635f1a2a7260ff (diff) | |
download | qemu-b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf.zip qemu-b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf.tar.gz qemu-b60a7726cc0f5cbb2aecdbba67aeaf54ffc2c9cf.tar.bz2 |
Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
Add HMP command "info memory-devices"
qemu-socket: Eliminate silly QERR_ macros
qemu-socket: Polish errors for connect() and listen() failure
qemu-iotests: Test missing "driver" key for blockdev-add
tests: add QMP input visitor test for unions with no discriminator
qapi: dealloc visitor, implement visit_start_union
qapi: add visit_start_union and visit_end_union
virtio-balloon: fix integer overflow in memory stats feature
monitor: Reset HMP mon->rs in CHR_EVENT_OPEN
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio/virtio-balloon.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 2c30b3d..b5cf7ca 100644 --- a/hw/virtio/virtio-balloon.c +++ b/hw/virtio/virtio-balloon.c @@ -87,7 +87,7 @@ static void balloon_stats_destroy_timer(VirtIOBalloon *s) } } -static void balloon_stats_change_timer(VirtIOBalloon *s, int secs) +static void balloon_stats_change_timer(VirtIOBalloon *s, int64_t secs) { timer_mod(s->stats_timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) + secs * 1000); } @@ -170,6 +170,11 @@ static void balloon_stats_set_poll_interval(Object *obj, struct Visitor *v, return; } + if (value > UINT_MAX) { + error_setg(errp, "timer value is too big"); + return; + } + if (value == s->stats_poll_interval) { return; } |