qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eduardo Habkost <ehabkost@redhat.com>, qemu-devel@nongnu.org
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
	"Andreas Färber" <afaerber@suse.de>,
	"Igor Mammedov" <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/2] qom: Fix ambiguous path detection when ambiguous=NULL
Date: Thu, 13 Jul 2017 14:09:30 +0200	[thread overview]
Message-ID: <bc6e039f-f493-9f1b-39ee-69727fe99640@redhat.com> (raw)
In-Reply-To: <20170710182322.GE5167@localhost.localdomain>

On 10/07/2017 20:23, Eduardo Habkost wrote:
> On Fri, Jul 07, 2017 at 06:30:50PM -0300, Eduardo Habkost wrote:
>> object_resolve_path*() ambiguous path detection breaks when
>> ambiguous==NULL and the object tree have 3 objects of the same type and
>> only 2 of them are under the same parent.  e.g.:
>>
>>  /container/obj1 (TYPE_FOO)
>>  /container/obj2 (TYPE_FOO)
>>  /obj2 (TYPE_FOO)
>>
>> With the above tree, object_resolve_path_type("", TYPE_FOO, NULL) will
>> incorrectly return /obj2, because the search inside "/container" will
>> return NULL, and the match at "/obj2" won't be detected as ambiguous.
>>
>> Fix that by always calling object_resolve_partial_path() with a non-NULL
>> ambiguous parameter.
>>
>> Test case included.
>>
>> Reported-by: Igor Mammedov <imammedo@redhat.com>
>> Cc: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
>>
>> Eduardo Habkost (2):
>>   tests: Test case for object_resolve_path*()
> 
> I'm queueing patch 1/2 on my machine-next tree.  I will wait a
> little longer for additional feedback on patch 2/2 before merging
> it.

Please apply both (with or without fixup, it's fine either way).

Paolo

>>   qom: Fix ambiguous path detection when ambiguous=NULL
>>
>>  qom/object.c               | 17 ++++++++---------
>>  tests/check-qom-proplist.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 52 insertions(+), 9 deletions(-)
>>
>> -- 
>> 2.9.4
>>
>>
> 

      reply	other threads:[~2017-07-13 12:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-07 21:30 [Qemu-devel] [PATCH 0/2] qom: Fix ambiguous path detection when ambiguous=NULL Eduardo Habkost
2017-07-07 21:30 ` [Qemu-devel] [PATCH 1/2] tests: Test case for object_resolve_path*() Eduardo Habkost
2017-07-10  8:10   ` Igor Mammedov
2017-07-10 14:45     ` Eduardo Habkost
2017-07-10 14:48       ` Igor Mammedov
2017-07-10 15:33       ` [Qemu-devel] [PATCH] fixup! qom: Fix ambiguous path detection when ambiguous=NULL Eduardo Habkost
2017-07-10 16:26         ` Igor Mammedov
2017-07-07 21:30 ` [Qemu-devel] [PATCH 2/2] " Eduardo Habkost
2017-07-10  8:18   ` Igor Mammedov
2017-07-10  6:42 ` [Qemu-devel] [PATCH 0/2] " Mark Cave-Ayland
2017-07-10 18:23 ` Eduardo Habkost
2017-07-13 12:09   ` 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=bc6e039f-f493-9f1b-39ee-69727fe99640@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=afaerber@suse.de \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --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 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).