All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: damien.hedde@greensocs.com, pbonzini@redhat.com,
	berrange@redhat.com, ehabkost@redhat.com, borntraeger@de.ibm.com
Subject: Re: [PATCH] monitor: Fix find_device_state() for IDs containing slashes
Date: Wed, 10 Nov 2021 06:49:03 +0100	[thread overview]
Message-ID: <87sfw45zn4.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20211019085711.86377-1-armbru@redhat.com> (Markus Armbruster's message of "Tue, 19 Oct 2021 10:57:11 +0200")

Markus Armbruster <armbru@redhat.com> writes:

> Recent commit 6952026120 "monitor: Tidy up find_device_state()"
> assumed the function's argument is "the device's ID or QOM path" (as
> documented for device_del).  It's actually either an absolute QOM
> path, or a QOM path relative to /machine/peripheral/.  Such a relative
> path is a device ID when it doesn't contain a slash.  When it does,
> the function now always fails.  Broke iotest 200, which uses relative
> path "vda/virtio-backend".
>
> It fails because object_resolve_path_component() resolves just one
> component, not a relative path.
>
> The obvious function to resolve relative paths is
> object_resolve_path().  It picks a parent automatically.  Too much
> magic, we want to specify the parent.  Create new
> object_resolve_path_at() for that, and use it in find_device_state().
>
> Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Queued for 6.2 & PR sent.



      parent reply	other threads:[~2021-11-10  5:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19  8:57 [PATCH] monitor: Fix find_device_state() for IDs containing slashes Markus Armbruster
2021-10-19  9:01 ` Christian Borntraeger
2021-10-19 10:13 ` Paolo Bonzini
2021-10-28  5:40   ` Markus Armbruster
2021-11-04  8:59     ` Markus Armbruster
2021-11-10  5:49 ` Markus Armbruster [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=87sfw45zn4.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=borntraeger@de.ibm.com \
    --cc=damien.hedde@greensocs.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@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.