From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeO2r-0002B0-VJ for qemu-devel@nongnu.org; Tue, 22 Sep 2015 09:55:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZeO2o-0004Xp-Kd for qemu-devel@nongnu.org; Tue, 22 Sep 2015 09:55:45 -0400 Received: from lhrrgout.huawei.com ([194.213.3.17]:19626) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZeO2n-0004XW-Bg for qemu-devel@nongnu.org; Tue, 22 Sep 2015 09:55:42 -0400 References: <1442333283-13119-1-git-send-email-marcandre.lureau@redhat.com> <1442333283-13119-11-git-send-email-marcandre.lureau@redhat.com> From: Claudio Fontana Message-ID: <56015DD4.8090903@huawei.com> Date: Tue, 22 Sep 2015 15:55:32 +0200 MIME-Version: 1.0 In-Reply-To: <1442333283-13119-11-git-send-email-marcandre.lureau@redhat.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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: marcandre.lureau@redhat.com, qemu-devel@nongnu.org Cc: drjones@redhat.com, cam@cs.ualberta.ca, stefanha@redhat.com On 15.09.2015 18:07, marcandre.lureau@redhat.com wrote: > From: Marc-André Lureau > > Failing to create a chardev shouldn't be fatal. > > Signed-off-by: Marc-André Lureau > --- > hw/misc/ivshmem.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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(void * opaque, EventNotifier * > > if (chr == NULL) { > error_report("creating eventfd for eventfd %d failed", eventfd); > - exit(1); > + return NULL; > } > qemu_chr_fe_claim_no_fail(chr); > > 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. Is there such a change somewhere in the patchset I have missed? Have you checked that the resources allocated during pci_ivshmem_init are released on pci_ivshmem_uninit? Ciao Claudio