[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Fix for qemu crash on assertion error when addi
From: |
Jan Kiszka |
Subject: |
Re: [Qemu-devel] [PATCH] Fix for qemu crash on assertion error when adding PCI passthru device. |
Date: |
Mon, 18 Jun 2012 08:24:33 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 |
On 2012-06-17 16:28, Anthony Liguori wrote:
> On 06/17/2012 03:34 AM, Michael S. Tsirkin wrote:
>> On Sun, Jun 17, 2012 at 06:26:33AM +0000, Ma, Stephen B. wrote:
>>>
>>> Michael,
>>>
>>> Thanks for the review. I added the unparent to the qdev_free.
>>>
>>>
>>> ---
>>> hw/qdev.c | 1 +
>>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>>
>>> diff --git a/hw/qdev.c b/hw/qdev.c
>>> index d2dc28b..ed1328d 100644
>>> --- a/hw/qdev.c
>>> +++ b/hw/qdev.c
>>> @@ -264,6 +264,7 @@ void qdev_init_nofail(DeviceState *dev)
>>> /* Unlink device from bus and free the structure. */
>>> void qdev_free(DeviceState *dev)
>>> {
>>> + object_unparent(OBJECT(dev));
>>> object_delete(OBJECT(dev));
>>> }
>>>
>>> --
>>> 1.7.1
>>
>> Anthony, any feedback?
>
> Yes, this is wrong.
>
> PCI passthrough isn't in qemu.git so it's not clear to me where this is
> happening. Why would qdev_free be called when adding a PCI passthru
> device?
The bug is reproducible with any in-tree device (at least PCI) that
happens to return != 0 from its init handler.
Jan
signature.asc
Description: OpenPGP digital signature