All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, lvivier@redhat.com,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [PATCH for-2.9 0/2] Fix QemuOpts regression on bogus keys
Date: Tue, 21 Mar 2017 10:28:05 +0100	[thread overview]
Message-ID: <87shm7rnbu.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20170321031705.22291-1-eblake@redhat.com> (Eric Blake's message of "Mon, 20 Mar 2017 22:17:03 -0500")

Eric Blake <eblake@redhat.com> writes:

> Reported to me off-list by Laurent Vivier, who found the
> problem while working on https://bugzilla.redhat.com/1433193
> Broken since 2.7, but the fix is a one-liner (pointing out my
> embarrassing mistake of mis-converting a pre-decrement operator);
> as a bug fix, it still qualifies for 2.9 in spite of hard freeze,
> on the other hand, as the regression was not introduced in 2.9,
> I also understand if it is postponed.
>
> Eric Blake (2):
>   tests: Expose regression in QemuOpts visitor
>   qapi: Fix QemuOpts visitor regression on unvisited input
>
>  qapi/opts-visitor.c       |  6 +++---
>  tests/test-opts-visitor.c | 29 ++++++++++++++++++++++++++---
>  2 files changed, 29 insertions(+), 6 deletions(-)

Regresses

    $ qemu-system-x86_64 -object memory-backend-ram,id=mem1,size=4k
    qemu-system-x86_64: -object memory-backend-ram,id=mem1,size=4k: Invalid parameter 'id'

I guess the culprit is commit 3a4641:

    pdict = qemu_opts_to_qdict(opts, NULL);
    qdict_del(pdict, "qom-type");
    qdict_del(pdict, "id");

    v = opts_visitor_new(opts);
    obj = user_creatable_add_type(type, id, pdict, v, errp);
    visit_free(v);

This deletes "qom-type" and "id" from pdict, but not opts.  The deletion
makes user_creatable_add_type() skip visiting them as intended, but it
also makes visit_check_struct() fail, because the opts visitor still
expects the two to be visited.

  parent reply	other threads:[~2017-03-21  9:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-21  3:17 [Qemu-devel] [PATCH for-2.9 0/2] Fix QemuOpts regression on bogus keys Eric Blake
2017-03-21  3:17 ` [Qemu-devel] [PATCH 1/2] tests: Expose regression in QemuOpts visitor Eric Blake
2017-03-21  4:41   ` Michael Roth
2017-03-21  9:01   ` Laurent Vivier
2017-03-21 13:21     ` Eric Blake
2017-03-21 13:33       ` Laurent Vivier
2017-03-21 15:36         ` Eric Blake
2017-03-21 16:01           ` Markus Armbruster
2017-03-21 16:10             ` Laurent Vivier
2017-03-21  3:17 ` [Qemu-devel] [PATCH 2/2] qapi: Fix QemuOpts visitor regression on unvisited input Eric Blake
2017-03-21  4:42   ` Michael Roth
2017-03-21  8:19   ` Laurent Vivier
2017-03-21  9:28 ` Markus Armbruster [this message]
2017-03-21 13:23   ` [Qemu-devel] [PATCH for-2.9 0/2] Fix QemuOpts regression on bogus keys Eric Blake

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=87shm7rnbu.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=lvivier@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.