qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
	vsementsov@virtuozzo.com, "Eduardo Habkost" <ehabkost@redhat.com>,
	"open list:GLUSTER" <qemu-block@nongnu.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	qemu-devel@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
	"open list:GLUSTER" <integration@gluster.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Igor Mammedov" <imammedo@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [PATCH v4 5/5] qapi: More complex uses of QAPI_LIST_APPEND
Date: Fri, 5 Feb 2021 11:13:59 -0600	[thread overview]
Message-ID: <fae1d759-827e-1c16-63ab-0e4ad97da87c@redhat.com> (raw)
In-Reply-To: <87mtww59jp.fsf@dusky.pond.sub.org>

On 1/26/21 3:31 AM, Markus Armbruster wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
>> These cases require a bit more thought to review; in each case, the
>> code was appending to a list, but not with a FOOList **tail variable.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
>>
>> ---
>> fix qmp_guest_network_get_interfaces [Vladimir]
> 
> Fails tests/test-qga.  I should've double-checked earlier.

And me, too.  Looks like the culprit is:

>>
>> -        address_list = &info->value->ip_addresses;
>> -
>> -        while (*address_list && (*address_list)->next) {
>> -            address_list = &(*address_list)->next;
>> -        }
>> -
>> -        if (!*address_list) {
>> -            *address_list = address_item;
>> -        } else {
>> -            (*address_list)->next = address_item;
>> +        address_tail = &info->ip_addresses;
>> +        while (!*address_tail) {
>> +            address_tail = &(*address_tail)->next;
>>          }
>> +        QAPI_LIST_APPEND(address_tail, address_item);

right here; the condition 'while (!*address_tail)' should instead be
'while (*address_tail)'.  Will submit v5 now that I've identified the bug.

> I'd like to drop just this part, and merge the rest.  You can then
> respin just this part as a follow-up patch.  Okay?
> 
> I can't test qemu-ga under Windows.  Fingers crossed...
> 
> [...]
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



  parent reply	other threads:[~2021-02-05 18:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-13 22:10 [PATCH v4 0/5] Common macros for QAPI list growth Eric Blake
2021-01-13 22:10 ` [PATCH v4 1/5] net: Clarify early exit condition Eric Blake
2021-01-14  4:54   ` Vladimir Sementsov-Ogievskiy
2021-01-19 16:08     ` Eric Blake
2021-01-13 22:10 ` [PATCH v4 2/5] qapi: A couple more QAPI_LIST_PREPEND() stragglers Eric Blake
2021-01-14  5:18   ` Vladimir Sementsov-Ogievskiy
2021-01-13 22:10 ` [PATCH v4 3/5] qapi: Introduce QAPI_LIST_APPEND Eric Blake
2021-01-14 12:59   ` Markus Armbruster
2021-01-13 22:10 ` [PATCH v4 4/5] qapi: Use QAPI_LIST_APPEND in trivial cases Eric Blake
2021-01-13 22:10 ` [PATCH v4 5/5] qapi: More complex uses of QAPI_LIST_APPEND Eric Blake
2021-01-14 13:08   ` Markus Armbruster
2021-01-26  9:31   ` Markus Armbruster
2021-01-27 18:12     ` Eric Blake
2021-01-28  7:45       ` Markus Armbruster
2021-02-05 17:13     ` Eric Blake [this message]
2021-01-14 13:15 ` [PATCH v4 0/5] Common macros for QAPI list growth Markus Armbruster

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=fae1d759-827e-1c16-63ab-0e4ad97da87c@redhat.com \
    --to=eblake@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=integration@gluster.org \
    --cc=jasowang@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=michael.roth@amd.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    /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).