qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH for-2.12] hw/misc/macio: Fix crash when listing


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH for-2.12] hw/misc/macio: Fix crash when listing device properties of macio device
Date: Tue, 20 Mar 2018 11:22:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 20.03.2018 06:05, Mark Cave-Ayland wrote:
> On 19/03/18 14:00, Thomas Huth wrote:
> 
>> The macio-newworld device can currently be used to abort QEMU
>> unexpectedly:
>>
>> $ ppc-softmmu/qemu-system-ppc -S -M ref405ep,accel=qtest -qmp stdio
>> {"QMP": {"version": {"qemu": {"micro": 50, "minor": 11, "major": 2},
>>   "package": "build-all"}, "capabilities": []}}
>> { 'execute': 'qmp_capabilities' }
>> {"return": {}}
>> { 'execute': 'device-list-properties',
>>    'arguments': {'typename': 'macio-newworld'}}
>> Unexpected error in qemu_chr_fe_init() at chardev/char-fe.c:222:
>> Device 'serial0' is in use
>> Aborted (core dumped)
>>
>> qdev properties should be set during realize(), not during
>> instance_init(),
>> so move the related code there to fix this problem.
> 
> Ah right, presumably this is because of the reference to serial_hds
> again?

Right.

> The patch looks good, although given that it affects
> macio_instance_init() and macio_common_realize() then I would have
> expected this to have failed on the macio-oldworld device too (or
> perhaps you were just unlucky that this was the first macio-*world
> device enumerated).

Yes, the bug triggers also with the macio-oldworld device. I just hit it
with the newworld device first.

 Thomas



reply via email to

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