[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev' |
Date: |
Fri, 15 Jul 2016 11:16:15 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 07/15/2016 12:56 AM, Xiao Guangrong wrote:
>>> Note that you don't have to call visit_next_list() in a virtual visit.
>>> For an example, see prop_get_fdt(). Good enough already?
>>
>> Yes, definitely! I'm queueing Guangrong's patch because it fixes a
>> crash and the leak existed before, but without next_list we can indeed
>> visit a "virtual" list and fix the leak. It can be done during the -rc
>> period.
>
> So you want to build uint16List list and save it as a "virtual" list in
> host_memory_backend_get_host_nodes(), then its caller can directly fetch
> this 'virtual' list from the visit?
With a virtual list visit, you don't even need a uint16List object.
Merely call visit_start_list(NULL) to start the list with no matching
uint16List, then visit_type_int16() for each list element (note no
visit_next_list() calls), then visit_end_list().
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature