[libvirt] [PATCH] xen: Use internal interfaces in xenDomainUsedCpus

Stefan Bader stefan.bader at canonical.com
Tue Aug 6 11:28:58 UTC 2013


On 05.08.2013 19:52, Jim Fehlig wrote:
> 
> libvirt typically uses a '*Internal' naming pattern for these types of
> internal functions, e.g. xenUnifiedDomainGetVcpusFlagsInternal.  Also as
> we touch this code we should strive to use the libvirt pattern of
> putting each parameter after the first on a new line when the list of
> parameters exceeds 80 columns.  Finally, since you added a line after
> the xenUnifiedNodeGetInfo declaration, we should add one here too.
> 
Ok, changed.

> 
> I don't think this comment is necessary.  Instead, just send a follow-up
> patch :).

Oh well, it was a kind of reminder, but beside of the "doing it correct" part,
the current usage is ok as there is no special checking between public and
private usage which could lock up... :)

>> @@ -1501,7 +1533,7 @@ xenUnifiedDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
>>      } else {
>>          char *cpus;
>>          xenUnifiedLock(priv);
>> -        cpus = xenDomainUsedCpus(dom);
>> +        cpus = xenDomainUsedCpus(dom, def);
>>   
> 
> This should be minidef right?  Otherwise def is NULL, resulting in a
> segfault further down the call chain.
>

Absolutely right. I missed to do that in the version I forward ported to HEAD
since I did the fix and testing in an older version. :/
Good you spotted that.

Ok, I updated the patch as suggested (attached).

-Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-xen-Use-internal-interfaces-in-xenDomainUsedCpus.patch
Type: text/x-diff
Size: 8589 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130806/8b43730d/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130806/8b43730d/attachment-0001.sig>


More information about the libvir-list mailing list