From: Max Reitz <mreitz@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: peter.maydell@linaro.org, kchamart@redhat.com,
pbonzini@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH for-2.9] sheepdog: Fix crash in co_read_response()
Date: Tue, 11 Apr 2017 16:13:29 +0200 [thread overview]
Message-ID: <f84e28fe-3169-8ab8-83e4-d94f1ec47838@redhat.com> (raw)
In-Reply-To: <1491919733-21065-1-git-send-email-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 738 bytes --]
On 11.04.2017 16:08, Kevin Wolf wrote:
> This fixes a regression introduced in commit 9d456654.
>
> aio_co_wake() can only be used to reenter a coroutine that was already
> previously entered, otherwise co->ctx is uninitialised and we access
> garbage. Using it immediately after qemu_coroutine_create() like in
> co_read_response() is wrong and causes segfaults.
>
> Replace the call with aio_co_enter(), which gets an explicit AioContext
> parameter and works even for new coroutines.
>
> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
> Tested-by: Kashyap Chamarthy <kchamart@redhat.com>
> ---
> block/sheepdog.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 512 bytes --]
next prev parent reply other threads:[~2017-04-11 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 14:08 [Qemu-devel] [PATCH for-2.9] sheepdog: Fix crash in co_read_response() Kevin Wolf
2017-04-11 14:13 ` Max Reitz [this message]
2017-04-11 14:33 ` Kashyap Chamarthy
2017-04-11 15:46 ` Peter Maydell
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=f84e28fe-3169-8ab8-83e4-d94f1ec47838@redhat.com \
--to=mreitz@redhat.com \
--cc=kchamart@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.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 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).