qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 10/46] ivshmem: remove last exit(1)


From: Marc-André Lureau
Subject: Re: [Qemu-devel] [PATCH v3 10/46] ivshmem: remove last exit(1)
Date: Tue, 22 Sep 2015 10:00:46 -0400 (EDT)

Hi

----- Original Message -----
> On 15.09.2015 18:07, address@hidden wrote:
> > From: Marc-André Lureau <address@hidden>
> > 
> > Failing to create a chardev shouldn't be fatal.
> > 
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> >  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?

Yes, see other patches such as "ivshmem: more qdev conversion" & "ivshmem: fix 
pci_ivshmem_exit()"

thanks



reply via email to

[Prev in Thread] Current Thread [Next in Thread]