From: "Michael S. Tsirkin" <mst@redhat.com>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] weird qdev error
Date: Mon, 13 Feb 2012 06:58:08 +0200 [thread overview]
Message-ID: <20120213045807.GA22676@redhat.com> (raw)
In-Reply-To: <20120213011813.GA8482@redhat.com>
On Mon, Feb 13, 2012 at 03:18:13AM +0200, Michael S. Tsirkin wrote:
> > I also see this:
> >
> > device_add virtio-net-pci,netdev=foo,mac=52:54:00:12:34:56,id=bla
> > device_del bla
> > *** glibc detected *** /home/mst/qemu-test/bin/qemu-system-x86_64:
> > corrupted double-linked list: 0x00007fae434565a0 ***
> >
> > Am I alone?
Doesn't solve this issue, but shouldn't we use _SAFE
in object_property_del_child? Like this:
--->
qemu: use safe list macro
As we might remove an element from list, use the safe macro
to walk it.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
diff --git a/qom/object.c b/qom/object.c
index 5e5b261..8b64fb6 100644
--- a/qom/object.c
+++ b/qom/object.c
@@ -299,9 +299,9 @@ static void object_property_del_all(Object *obj)
static void object_property_del_child(Object *obj, Object *child, Error **errp)
{
- ObjectProperty *prop;
+ ObjectProperty *prop, *next;
- QTAILQ_FOREACH(prop, &obj->properties, node) {
+ QTAILQ_FOREACH_SAFE(prop, &obj->properties, node, next) {
if (!strstart(prop->type, "child<", NULL)) {
continue;
}
next prev parent reply other threads:[~2012-02-13 4:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-12 17:07 [Qemu-devel] weird qdev error Michael S. Tsirkin
2012-02-12 17:31 ` Michael S. Tsirkin
2012-02-12 17:38 ` Anthony Liguori
2012-02-12 17:57 ` Michael S. Tsirkin
2012-02-12 20:04 ` Anthony Liguori
2012-02-12 20:15 ` Michael S. Tsirkin
2012-02-12 20:19 ` Anthony Liguori
2012-02-13 0:17 ` Michael S. Tsirkin
2012-02-13 1:18 ` Michael S. Tsirkin
2012-02-13 4:58 ` Michael S. Tsirkin [this message]
2012-02-13 10:19 ` Paolo Bonzini
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=20120213045807.GA22676@redhat.com \
--to=mst@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.