[Libvirt-cim] [PATCH 2 of 2] AllocationCapabilities getInstance seg faults on KVM system with Xen request

Jay Gagnon grendel at linux.vnet.ibm.com
Thu Jan 24 14:00:25 UTC 2008


Heidi Eckhart wrote:
> # HG changeset patch
> # User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
> # Date 1201175805 -3600
> # Node ID 70dedb925282ed3ceccf95872537204a1531c777
> # Parent  65e42d8fd81f65e561b32c99189e9940e0556d00
> AllocationCapabilities getInstance seg faults on KVM system with Xen request
>
> wbemgi 'http://localhost:5988/root/virt:Xen_AllocationCapabilities.InstanceID="ProcessorPool/0"'
> on a KVM system seg faults, as not the appropriate error code is set.
> Signed-off-by: Heidi Eckhart <heidieck at linux.vnet.ibm.com>
>
> diff -r 65e42d8fd81f -r 70dedb925282 src/Virt_AllocationCapabilities.c
> --- a/src/Virt_AllocationCapabilities.c	Thu Jan 24 12:56:43 2008 +0100
> +++ b/src/Virt_AllocationCapabilities.c	Thu Jan 24 12:56:45 2008 +0100
> @@ -91,8 +91,13 @@ CMPIStatus enum_alloc_cap_instances(cons
>                  goto out;
>
>          conn = connect_by_classname(broker, CLASSNAME(ref), &s);
> -        if (conn == NULL)
> -                goto out;
> +        if (conn == NULL) {
> +                if (id) 
> +                        cu_statusf(broker, &s,
> +                                   CMPI_RC_ERR_NOT_FOUND,
> +                                   "Requested Object could not be found.");
> +                goto out;
> +        }
>
>          s = get_all_pools(broker, conn, NAMESPACE(ref), &device_pool_list);
>          if (s.rc != CMPI_RC_OK) {
>
> _______________________________________________
> Libvirt-cim mailing list
> Libvirt-cim at redhat.com
> https://www.redhat.com/mailman/listinfo/libvirt-cim
>   
And a good catch here too. +1

-- 

-Jay




More information about the Libvirt-cim mailing list