All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: peter.maydell@linaro.org, aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] qemu-option: Guard against qemu_opts_set_defaults() misuse
Date: Fri, 02 Aug 2013 18:51:48 +0200	[thread overview]
Message-ID: <87mwp0t4rf.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <51FBB5FC.90802@redhat.com> (Eric Blake's message of "Fri, 02 Aug 2013 07:37:00 -0600")

Eric Blake <eblake@redhat.com> writes:

> On 08/02/2013 01:34 AM, Markus Armbruster wrote:
>> Commit 6d4cd40 fixed qemu_opts_set_defaults() for an existing corner
>> case, but broke it for another one that can't be reached in current
>> code.
>> 
>
>> 
>> Not reachable, because we never pass lists with !list->merge_lists to
>> qemu_opts_set_defaults().
>> 
>> Guard against possible (if unlikely) future misuse with assert().
>> 
>> Reported-by: Peter Maydell <peter.maydell@linaro.org>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>  util/qemu-option.c | 9 +++++++++
>>  1 file changed, 9 insertions(+)
>
>> +     * This code doesn't work for defaults && !list->merge_lists: when
>> +     * params has no id=, and list has an element with !opts->id, it
>> +     * appends a new element instead of returning the existing opts.
>> +     * However, we got no use for this case.  Guard against possible
>
> s/got/have/

I'd be fine with fixing this on commit.

> Reviewed-by: Eric Blake <eblake@redhat.com>

Thanks!

  reply	other threads:[~2013-08-02 21:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02  7:34 [Qemu-devel] [PATCH] qemu-option: Guard against qemu_opts_set_defaults() misuse Markus Armbruster
2013-08-02 13:37 ` Eric Blake
2013-08-02 16:51   ` Markus Armbruster [this message]
2013-08-14 16:28 ` Anthony Liguori

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=87mwp0t4rf.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=eblake@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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.