[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] weird qdev error
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] weird qdev error |
Date: |
Sun, 12 Feb 2012 22:15:48 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Feb 12, 2012 at 02:04:29PM -0600, Anthony Liguori wrote:
> On 02/12/2012 11:57 AM, Michael S. Tsirkin wrote:
> >On Sun, Feb 12, 2012 at 11:38:24AM -0600, Anthony Liguori wrote:
> >>From: Anthony Liguori<address@hidden>
> >>Date: Sun, 12 Feb 2012 11:36:24 -0600
> >>Subject: [PATCH] device_add: don't add a /peripheral link until init is
> >>complete
> >>
> >>Otherwise we end up with a dangling reference which causes qdev_free() to
> >>fail.
> >>
> >>Reported-by: Michael Tsirkin<address@hidden>
> >>Signed-off-by: Anthony Liguori<address@hidden>
> >
> >This handles the option parsing but what about hotplug
> >failures (when bus->hotplug returns an error)?
>
> Sorry, I don't follow.
>
> The assert you reported was that object_free() noted a reference
> count of !0 which indicates something else was holding the reference
> to the object. In this case, it was the child link in /peripheral.
>
> By delaying creating the link in /peripheral, we eliminate the problem
> completely.
Th other problem was internal in pci which calls ->hostplug
during initialization. This doesn't seem affected?
But I didn't try, maybe I misundertand.
> BTW, the explicit calls to do_pci_unregister are redundant.
> finalize() will be called during cleanup which means exit() will be
> invoked (which already calls do_pci_unregister). I'm not sure why
> this isn't failing more aggressively but it looks clearly wrong to
> me.
>
> Regards,
>
> Anthony Liguori
Me too. Want to try to drop them?
- [Qemu-devel] weird qdev error, Michael S. Tsirkin, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Michael S. Tsirkin, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Anthony Liguori, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Michael S. Tsirkin, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Anthony Liguori, 2012/02/12
- Re: [Qemu-devel] weird qdev error,
Michael S. Tsirkin <=
- Re: [Qemu-devel] weird qdev error, Anthony Liguori, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Michael S. Tsirkin, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Michael S. Tsirkin, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Michael S. Tsirkin, 2012/02/12
- Re: [Qemu-devel] weird qdev error, Paolo Bonzini, 2012/02/13