[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
- Re: [Qemu-devel] [PATCH v3 07/46] ivshmem: remove superflous ivshmem_attr field, (continued)
- [Qemu-devel] [PATCH v3 06/46] ivshmem: remove unnecessary dup(), marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 08/46] ivshmem: remove useless doorbell field, marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 09/46] ivshmem: more qdev conversion, marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 10/46] ivshmem: remove last exit(1), marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 11/46] ivshmem: limit maximum number of peers to G_MAXUINT16, marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 12/46] ivshmem: simplify around increase_dynamic_storage(), marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 13/46] ivshmem: allocate eventfds in resize_peers(), marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 14/46] ivshmem: remove useless ivshmem_update_irq() val argument, marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 15/46] ivshmem: initialize max_peer to -1, marcandre . lureau, 2015/09/15
- [Qemu-devel] [PATCH v3 16/46] ivshmem: remove max_peer field, marcandre . lureau, 2015/09/15