From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Lukas Straub <lukasstraub2@web.de>,
qemu-devel@nongnu.org,
zhanghailiang <zhang.zhanghailiang@huawei.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Cc: "Zhang, Chen" <chen.zhang@intel.com>
Subject: Re: [Qemu-devel] [PATCH v2] net/colo-compare.c: Fix a crash in COLO Primary.
Date: Mon, 6 May 2019 13:13:15 +0200 [thread overview]
Message-ID: <612f07b7-7090-8934-ce58-0a65785e9d64@redhat.com> (raw)
In-Reply-To: <20190420191425.7d1dab82@luklap>
Cc'ing Paolo & Stefan
On 4/20/19 7:14 PM, Lukas Straub wrote:
> From: Lukas Straub <lukasstraub2@web.de>
> Because event_unhandled_count may be accessed concurrently, it needs
> to be protected by taking the lock. However the assert is outside the
> lock, probably causing it to read garbage and aborting Qemu erroneously.
>
> The Bug only happens when running Qemu in COLO mode.
>
> This Patch fixes the following bug: https://bugs.launchpad.net/qemu/+bug/1824622
>
> Signed-off-by: Lukas Straub <lukasstraub2@web.de>
> ---
> net/colo-compare.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c
> index bf10526f05..fcb491121b 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -813,9 +813,8 @@ static void colo_compare_handle_event(void *opaque)
> break;
> }
>
> - assert(event_unhandled_count > 0);
> -
> qemu_mutex_lock(&event_mtx);
> + assert(event_unhandled_count > 0);
> event_unhandled_count--;
> qemu_cond_broadcast(&event_complete_cond);
> qemu_mutex_unlock(&event_mtx);
> --
> 2.20.1
>
>
prev parent reply other threads:[~2019-05-06 11:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-20 17:14 [Qemu-devel] [PATCH v2] net/colo-compare.c: Fix a crash in COLO Primary Lukas Straub
2019-04-21 10:13 ` Philippe Mathieu-Daudé
2019-04-23 6:58 ` Zhang, Chen
2019-05-06 10:32 ` Lukas Straub
2019-05-07 0:07 ` Jason Wang
2019-05-06 11:13 ` Philippe Mathieu-Daudé [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=612f07b7-7090-8934-ce58-0a65785e9d64@redhat.com \
--to=philmd@redhat.com \
--cc=chen.zhang@intel.com \
--cc=lukasstraub2@web.de \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.com \
--cc=zhang.zhanghailiang@huawei.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 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.