On 26 November 2014 at 03:09, Fam Zheng <f...@redhat.com> wrote: > On Tue, 11/25 18:21, Peter Maydell wrote: >> In qemu_poll_ns(), when we convert an int64_t nanosecond timeout into >> a struct timespec, we may accidentally run into overflow problems if >> the timeout is very long. This happens because the tv_sec field is a >> time_t, which is signed, so we might end up setting it to a negative >> value by mistake. This will result in what was intended to be a >> near-infinite timeout turning into an instantaneous timeout, and we'll >> busy loop. Cap the maximum timeout at INT32_MAX seconds (about 68 years) >> to avoid this problem.
> Reviewed-by: Fam Zheng <f...@redhat.com> Thanks. Applied to master (with a cc:stable). -- PMM