[libvirt] [PATCHv2 09/20] qemu: Fix possible race when pausing guest

Peter Krempa pkrempa at redhat.com
Fri Nov 2 19:29:13 UTC 2012


On 11/02/12 18:59, Eric Blake wrote:
> On 11/01/2012 10:22 AM, Peter Krempa wrote:
>> When pausing the guest while migration is running (to speed up
>> convergence) the virDomainSuspend API checks if the migration job is
>> active before entering the job. This could cause a possible race if the
>> virDomainSuspend is called while the job is active but ends before the
>> Suspend API enters the job (this would require that the migration is
>> aborted). This would cause a incorrect event to be emitted.
>
> Not just aborted, but also completed normally.  At any rate, I agree
> that we shouldn't be relying on the state of job.asyncJob until we have
> obtained the sync job.
>
>> ---
>>   src/qemu/qemu_driver.c | 16 ++++++++--------
>>   1 file changed, 8 insertions(+), 8 deletions(-)
>>

[...]

> In that case, this code is fixing a pre-existing bug, in preparation for
> the work in patch 10.  ACK as-is.
>

Thanks. I pushed this one. I should have ordered it at the beginning of 
the series to avoid confusion.

Peter




More information about the libvir-list mailing list