qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 05/22] main: free root container


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 05/22] main: free root container
Date: Thu, 9 Feb 2017 18:09:56 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


On 07/02/2017 21:01, Marc-André Lureau wrote:
> Hi
> 
> ----- Original Message -----
>>
>>
>> On 02/02/2017 15:51, Marc-André Lureau wrote:
>>> This should eventually free all objects that are only referenced by
>>> their parents.
>>>
>>> Signed-off-by: Marc-André Lureau <address@hidden>
>>> ---
>>>  vl.c | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/vl.c b/vl.c
>>> index 0b72b12878..945df1d17f 100644
>>> --- a/vl.c
>>> +++ b/vl.c
>>> @@ -4640,6 +4640,7 @@ int main(int argc, char **argv, char **envp)
>>>      audio_cleanup();
>>>      monitor_cleanup();
>>>      qemu_chr_cleanup();
>>> +    object_unref(object_get_root());
>>
>> This seems dangerous.  I'm pretty sure that a lot of non-hot-unpluggable
>> devices would leak or crash.
> 
> make check is ok. Any suggestion what else to check?

Not sure...  I would have to try with some logging to see what this
does.  But it doesn't seem safe, most devices are really not meant to be
hot-removed.

> This patch was added so that /chardevs container is cleaned up (with
> the following patches). Perhaps I could be more conservative and only
> unref (oops unparent) /chardevs.

Yeah, that would work.

Paolo



reply via email to

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