Re: [PATCH v2] qemu-kvm: add irqfd support

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

 



Michael S. Tsirkin wrote:
> On Fri, Apr 24, 2009 at 12:30:17AM -0400, Gregory Haskins wrote:
>   
>> +int kvm_irqfd(kvm_context_t kvm, int gsi)
>> +{
>> +	int fd, r;
>> +
>> +	if (!kvm_check_extension(kvm, KVM_CAP_IRQFD))
>> +		return -ENOENT;
>> +
>> +	fd = eventfd(0, 0);
>> +	if (fd < 0)
>> +		return fd;
>> +
>> +	r = assign_irqfd(kvm, fd, gsi);
>> +	if (r < 0)
>> +		return r;
>>     
>
> Do we need to close fd on error?
>   
Good catch.  This will be changing in v3 to do the allocation in kernel,
but I will be sure to properly cleanup this type of leak, however that
ends up looking.

Thanks Michael.
-Greg

>   
>> +
>> +	return fd;
>> +}
>>     


Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux