All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] weird qdev error
Date: Mon, 13 Feb 2012 11:19:22 +0100	[thread overview]
Message-ID: <4F38E3AA.5020408@redhat.com> (raw)
In-Reply-To: <20120213045807.GA22676@redhat.com>

On 02/13/2012 05:58 AM, Michael S. Tsirkin wrote:
> 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;
>          }

Yup, I thought I had pointed this out in a review of Anthony's QOM series...

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

      reply	other threads:[~2012-02-13 10:19 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
2012-02-13 10:19                   ` Paolo Bonzini [this message]

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=4F38E3AA.5020408@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=mst@redhat.com \
    --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.