From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeO7z-00067w-63 for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeO7v-0006yW-6l for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:01:03 -0400 Received: from mx5-phx2.redhat.com ([209.132.183.37]:32877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeO7u-0006wv-WD for qemu-devel@nongnu.org; Tue, 22 Sep 2015 10:00:59 -0400 Date: Tue, 22 Sep 2015 10:00:46 -0400 (EDT) From: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Message-ID: <1740444852.15133186.1442930446165.JavaMail.zimbra@redhat.com> In-Reply-To: <56015DD4.8090903@huawei.com> References: <1442333283-13119-1-git-send-email-marcandre.lureau@redhat.com> <1442333283-13119-11-git-send-email-marcandre.lureau@redhat.com> <56015DD4.8090903@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v3 10/46] ivshmem: remove last exit(1) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Claudio Fontana Cc: marcandre lureau , drjones@redhat.com, cam@cs.ualberta.ca, qemu-devel@nongnu.org, stefanha@redhat.com Hi ----- Original Message ----- > On 15.09.2015 18:07, marcandre.lureau@redhat.com wrote: > > From: Marc-Andr=C3=A9 Lureau > >=20 > > Failing to create a chardev shouldn't be fatal. > >=20 > > Signed-off-by: Marc-Andr=C3=A9 Lureau > > --- > > hw/misc/ivshmem.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c > > index 3af73a5..7ba93c0 100644 > > --- a/hw/misc/ivshmem.c > > +++ b/hw/misc/ivshmem.c > > @@ -299,7 +299,7 @@ static CharDriverState* create_eventfd_chr_device(v= oid > > * opaque, EventNotifier * > > =20 > > if (chr =3D=3D NULL) { > > error_report("creating eventfd for eventfd %d failed", eventfd= ); > > - exit(1); > > + return NULL; > > } > > qemu_chr_fe_claim_no_fail(chr); > > =20 > >=20 >=20 > I took a look at the eventfd_chr array in the IVShmemState, > and I noticed that it's allocated with malloc at some point for receiving > interrupts > with g_malloc0 in pci_ivshmem_init, but it's never freed in > pci_ivshmem_uninit. >=20 > Is there such a change somewhere in the patchset I have missed? >=20 > Have you checked that the resources allocated during pci_ivshmem_init are > released on pci_ivshmem_uninit? Yes, see other patches such as "ivshmem: more qdev conversion" & "ivshmem: = fix pci_ivshmem_exit()" thanks