qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 1/1] qemu/migration: fix the double free prob


From: QingFeng Hao
Subject: Re: [Qemu-devel] [PATCH v2 1/1] qemu/migration: fix the double free problem on from_src_file
Date: Thu, 8 Jun 2017 13:23:54 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1



在 2017/6/7 20:18, Dr. David Alan Gilbert 写道:
* QingFeng Hao (address@hidden) wrote:

在 2017/6/6 20:49, Kevin Wolf 写道:
Am 06.06.2017 um 07:24 hat QingFeng Hao geschrieben:
<snip>

I can't tell for postcopy_ram_listen_thread() - commit 660819b didn't
seem to remove a qemu_fclose() call there, but I can't see one left
behind either. Was the file leaked before commit 660819b or am I
missing something?
I don't think so because loadvm_postcopy_handle_listen creates thread
postcopy_ram_listen_thread
and passes mis->from_src_file as its arg, which will be closed by
migration_incoming_state_destroy.
What confuses me is in the series function calls of qemu_loadvm_state_main
etc, argument f looks
to be redundant as mis already contains from_src_file which equals to f.
In postcopy qemu_loadvm_state_main is called with two different file
arguments but the same mis argument;  see loadvm_handle_cmd_packaged for
the other case where it's called on a packaged-file blob.
yes, you are right, I missed that one. :)

Furthermore, mis may be
also redundant as it can be got via migration_incoming_get_current. Thanks!
We keep changing our minds about the preferred style.  Sometimes we
think it's best to pass the pointer, sometimes we think it's best
to call get_current.
Got it. Thanks!

Dave

Kevin

--
Regards
QingFeng Hao

--
Dr. David Alan Gilbert / address@hidden / Manchester, UK


--
Regards
QingFeng Hao




reply via email to

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