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: Claudio Fontana
Subject: Re: [Qemu-devel] [PATCH v3 10/46] ivshmem: remove last exit(1)
Date: Tue, 22 Sep 2015 15:58:39 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 22.09.2015 15:55, Claudio Fontana wrote:
> 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?

With your patchset applied, that would be _realize and _exit,
as changed by patch

[PATCH v3 09/46] ivshmem: more qdev conversion

Ciao,CLaudio









reply via email to

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