Re: [PATCH] Fix crash in QEMU auto-destroy with transient guests

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

 



On 02/28/2013 05:19 AM, Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
> 
> When the auto-destroy callback runs it is supposed to return
> NULL if the virDomainObjPtr is no longer valid. It was not
> doing this for transient guests, so we tried to virObjectUnlock
> a mutex which had been freed. This often led to a crash.
> 
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

ACK.

> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index db95d6e..1b9eede 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -4629,8 +4629,10 @@ qemuProcessAutoDestroy(virQEMUDriverPtr driver,
>  
>      if (!qemuDomainObjEndJob(driver, dom))
>          dom = NULL;
> -    if (dom && !dom->persistent)
> +    if (dom && !dom->persistent) {
>          qemuDomainRemoveInactive(driver, dom);
> +        dom = NULL;
> +    }
>      if (event)
>          qemuDomainEventQueue(driver, event);
>  
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]