qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qemu-option: Guard against qemu_opts_set_defaul


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] qemu-option: Guard against qemu_opts_set_defaults() misuse
Date: Fri, 02 Aug 2013 18:51:48 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux)

Eric Blake <address@hidden> 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 <address@hidden>
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  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 <address@hidden>

Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]