From: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Alberto Garcia <berto@igalia.com>,
qemu devel <qemu-devel@nongnu.org>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] quorum: fix segfault when read fails in fifo mode
Date: Fri, 5 Feb 2016 09:57:24 +0800 [thread overview]
Message-ID: <56B40184.4050000@cn.fujitsu.com> (raw)
In-Reply-To: <20160204122433.GA2314@noname>
On 02/04/2016 08:24 PM, Kevin Wolf wrote:
> Am 04.02.2016 um 11:19 hat Changlong Xie geschrieben:
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> Signed-off-by: Changlong Xie <xiecl.fnst@cn.fujitsu.com>
>> ---
>> block/quorum.c | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/block/quorum.c b/block/quorum.c
>> index a5ae4b8..0965277 100644
>> --- a/block/quorum.c
>> +++ b/block/quorum.c
>> @@ -295,6 +295,9 @@ static void quorum_aio_cb(void *opaque, int ret)
>> quorum_copy_qiov(acb->qiov, &acb->qcrs[acb->child_iter].qiov);
>> }
>> acb->vote_ret = ret;
>> + if (ret < 0) {
>> + acb->child_iter--;
>> + }
>> quorum_aio_finalize(acb);
>> return;
>> }
>
> This looks semantically correct to me (but I'd like to have an Ack from
> Berto), but I would fix it above: We shouldn't do ++acb->child_iter in
> the first place if the new value is >= s->num_children. So instead of
> decrementing after the fact, just move the increment to inside the then
> branch above.
Yes, will fix in next version.
Thanks
-Xie
>
> Kevin
>
>
> .
>
prev parent reply other threads:[~2016-02-05 1:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 10:19 [Qemu-devel] [PATCH] quorum: fix segfault when read fails in fifo mode Changlong Xie
2016-02-04 12:24 ` Kevin Wolf
2016-02-05 1:57 ` Changlong Xie [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=56B40184.4050000@cn.fujitsu.com \
--to=xiecl.fnst@cn.fujitsu.com \
--cc=berto@igalia.com \
--cc=dgilbert@redhat.com \
--cc=kwolf@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.