[libvirt] [PATCH] qemu: fix crash when removing <filterref> from interface with update-device

Eric Blake eblake at redhat.com
Thu May 1 12:17:53 UTC 2014


On 05/01/2014 02:57 AM, Laine Stump wrote:
> If a domain network interface that contains a <filterref> is modified
> "live" using "virsh update-device --live", libvirtd would crash. This
> was because the code supporting live update of an interface's
> filterref was assuming that a filterref might be added or modified,
> but didn't account for removing the filterref, resulting in a null
> dereference of the filter name.
> 
> Introduced with commit 258fb278, which was first in libvirt v1.0.1.
> 
> This addresses https://bugzilla.redhat.com/show_bug.cgi?id=1093301
> ---
>  src/qemu/qemu_hotplug.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

ACK

> 
> diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
> index ccfb358..cdf9eac 100644
> --- a/src/qemu/qemu_hotplug.c
> +++ b/src/qemu/qemu_hotplug.c
> @@ -1815,7 +1815,8 @@ qemuDomainChangeNetFilter(virConnectPtr conn,
>  
>      virDomainConfNWFilterTeardown(olddev);
>  
> -    if (virDomainConfNWFilterInstantiate(conn, vm->def->uuid, newdev) < 0) {
> +    if (newdev->filter &&
> +        virDomainConfNWFilterInstantiate(conn, vm->def->uuid, newdev) < 0) {
>          virErrorPtr errobj;
>  
>          virReportError(VIR_ERR_OPERATION_FAILED,
> 

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140501/31807915/attachment-0001.sig>


More information about the libvir-list mailing list