aboutsummaryrefslogtreecommitdiff
path: root/disas/cris.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-04-11 16:08:53 +0200
committerPeter Maydell <peter.maydell@linaro.org>2017-04-11 16:08:29 +0100
commit5eceb01adfbe513c0309528293b0b86e32a6e27d (patch)
tree680b15ec6975551011e63cb23cfe224830244c1f /disas/cris.c
parentf5ac5cfeb67c31c2938419e71572d1cee2f9dd5e (diff)
downloadqemu-5eceb01adfbe513c0309528293b0b86e32a6e27d.zip
qemu-5eceb01adfbe513c0309528293b0b86e32a6e27d.tar.gz
qemu-5eceb01adfbe513c0309528293b0b86e32a6e27d.tar.bz2
sheepdog: Fix crash in co_read_response()
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> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 1491919733-21065-1-git-send-email-kwolf@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'disas/cris.c')
0 files changed, 0 insertions, 0 deletions