Re: [PATCH] qemu: avoid double shutdown

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 02, 2011 at 11:37:37 -0700, Eric Blake wrote:
> * src/qemu/qemu_driver.c (qemudShutdownVMDaemon): Check that vm is
> still active.
> Reported by Wen Congyang as follows:
> 
> ---
> 
> I was able to reproduce a segfault due to double shutdown, as
> well as testing that this patch avoids the issue.
> 
>  src/qemu/qemu_driver.c |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
> index a3a68b1..d16a4ab 100644
> --- a/src/qemu/qemu_driver.c
> +++ b/src/qemu/qemu_driver.c
> @@ -2991,6 +2991,11 @@ static void qemudShutdownVMDaemon(struct qemud_driver *driver,
>      VIR_DEBUG("Shutting down VM '%s' pid=%d migrated=%d",
>                vm->def->name, vm->pid, migrated);
> 
> +    if (!virDomainObjIsActive(vm)) {
> +        VIR_DEBUG("VM '%s' not active", vm->def->name);
> +        return;
> +    }
> +

Looks like the solution Dan was asking for... ACK

Jirka

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]