From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Ma, Stephen B." <stephen.ma@hp.com>
Cc: "'qemu-devel@nongnu.org'" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Fix for qemu crash on assertion error when adding PCI passthru device.
Date: Tue, 12 Jun 2012 11:26:41 +0300 [thread overview]
Message-ID: <20120612082641.GC12356@redhat.com> (raw)
In-Reply-To: <36AF4B62444F4B4FB04EDD1FDAE1CF1D4889875E@G4W3209.americas.hpqcorp.net>
On Tue, Jun 12, 2012 at 04:31:20AM +0000, Ma, Stephen B. wrote:
> diff --git a/hw/qdev.c b/hw/qdev.c
> index 6a8f6bd..d2dc28b 100644
> --- a/hw/qdev.c
> +++ b/hw/qdev.c
> @@ -139,7 +139,7 @@ DeviceState *qdev_try_create(BusState *bus, const char *type)
> /* Initialize a device. Device properties should be set before calling
> this function. IRQs and MMIO regions should be connected/mapped after
> calling this function.
> - On failure, destroy the device and return negative value.
> + On failure, return a negative value.
> Return 0 on success. */
> int qdev_init(DeviceState *dev)
> {
Yes, I agree. qdev_init did now allocate the device so
it should not free it.
> @@ -150,7 +150,6 @@ int qdev_init(DeviceState *dev)
>
> rc = dc->init(dev);
> if (rc < 0) {
> - qdev_free(dev);
> return rc;
> }
>
Another thing we need to fix is unparent the device in
qdev_free.
--
MST
next prev parent reply other threads:[~2012-06-12 8:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-12 4:31 [Qemu-devel] [PATCH] Fix for qemu crash on assertion error when adding PCI passthru device Ma, Stephen B.
2012-06-12 8:26 ` Michael S. Tsirkin [this message]
2012-06-17 6:26 ` Ma, Stephen B.
2012-06-17 8:34 ` Michael S. Tsirkin
2012-06-17 14:28 ` Anthony Liguori
2012-06-18 6:24 ` Jan Kiszka
2012-07-18 20:42 ` Ma, Stephen B.
2012-07-19 6:27 ` Jan Kiszka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120612082641.GC12356@redhat.com \
--to=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stephen.ma@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).