From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gregory Haskins Subject: Re: [PATCH v2] qemu-kvm: add irqfd support Date: Mon, 27 Apr 2009 07:00:36 -0400 Message-ID: <49F59054.9050504@novell.com> References: <20090424042756.1896.90317.stgit@dev.haskins.net> <20090427104743.GA31112@redhat.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig3FB57FD491AEDB8135FE2C9D" Cc: kvm@vger.kernel.org, avi@redhat.com To: "Michael S. Tsirkin" Return-path: Received: from victor.provo.novell.com ([137.65.250.26]:55108 "EHLO victor.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751056AbZD0LAp (ORCPT ); Mon, 27 Apr 2009 07:00:45 -0400 In-Reply-To: <20090427104743.GA31112@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig3FB57FD491AEDB8135FE2C9D Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Michael S. Tsirkin wrote: > On Fri, Apr 24, 2009 at 12:30:17AM -0400, Gregory Haskins wrote: > =20 >> +int kvm_irqfd(kvm_context_t kvm, int gsi) >> +{ >> + int fd, r; >> + >> + if (!kvm_check_extension(kvm, KVM_CAP_IRQFD)) >> + return -ENOENT; >> + >> + fd =3D eventfd(0, 0); >> + if (fd < 0) >> + return fd; >> + >> + r =3D assign_irqfd(kvm, fd, gsi); >> + if (r < 0) >> + return r; >> =20 > > Do we need to close fd on error? > =20 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 > =20 >> + >> + return fd; >> +} >> =20 --------------enig3FB57FD491AEDB8135FE2C9D Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkn1kFQACgkQlOSOBdgZUxk6/QCfQlHhDHg5cuUYg291BGuaCGv0 NIkAmwZFur50NOuYJCYK2hPxpQT+mK+k =A97u -----END PGP SIGNATURE----- --------------enig3FB57FD491AEDB8135FE2C9D--