From: Gregory Haskins <ghaskins@novell.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: kvm@vger.kernel.org, avi@redhat.com
Subject: Re: [PATCH v2] qemu-kvm: add irqfd support
Date: Mon, 27 Apr 2009 07:00:36 -0400 [thread overview]
Message-ID: <49F59054.9050504@novell.com> (raw)
In-Reply-To: <20090427104743.GA31112@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 266 bytes --]
prev parent reply other threads:[~2009-04-27 11:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-24 4:30 [PATCH v2] qemu-kvm: add irqfd support Gregory Haskins
2009-04-27 10:47 ` Michael S. Tsirkin
2009-04-27 11:00 ` Gregory Haskins [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49F59054.9050504@novell.com \
--to=ghaskins@novell.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=mst@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.