Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-15 Thread Eric Blake
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,

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-15 Thread Xiao Guangrong
On 07/13/2016 07:37 PM, Paolo Bonzini wrote: On 13/07/2016 13:29, Markus Armbruster wrote: I'm curious about one thing. Eric/Markus, it would be nice to open code the visit of the list with visit_start_list(v, name, NULL, 0, ); if (err) { goto out; } ...

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 13:29, Markus Armbruster wrote: >> > I'm curious about one thing. Eric/Markus, it would be nice to open code >> > the visit of the list with >> > >> > visit_start_list(v, name, NULL, 0, ); >> > if (err) { >> > goto out; >> > } >> > ... >> >

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/07/2016 06:18, Xiao Guangrong wrote: >> >> Return MAX_NODES under this case to fix this bug >> >> Signed-off-by: Xiao Guangrong >> --- >> backends/hostmem.c | 22 ++ >> 1 file changed, 14

Re: [Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-13 Thread Paolo Bonzini
On 13/07/2016 06:18, Xiao Guangrong wrote: > > Return MAX_NODES under this case to fix this bug > > Signed-off-by: Xiao Guangrong > --- > backends/hostmem.c | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git

[Qemu-devel] [PATCH 1/2] hostmem: fix QEMU crash by 'info memdev'

2016-07-12 Thread Xiao Guangrong
'info memdev' crashes QEMU: (qemu) info memdev Unexpected error in parse_str() at qapi/string-input-visitor.c:111: Parameter 'null' expects an int64 value or range It is caused by null uint16List is returned if 'host-nodes' is the default value Return MAX_NODES under this case to fix