qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 07/17] nbd: convert to use qio_channel_yield


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [PATCH 07/17] nbd: convert to use qio_channel_yield
Date: Mon, 30 Jan 2017 15:50:44 +0000
User-agent: Mutt/1.7.1 (2016-10-04)

On Fri, Jan 20, 2017 at 05:43:12PM +0100, Paolo Bonzini wrote:
> +        aio_co_wake(s->recv_coroutine[i]);
>  
> -    qemu_coroutine_enter(nbd_get_client_session(bs)->send_coroutine);
> +        /* We're woken up by the recv_coroutine itself.  */
> +        qemu_coroutine_yield();

This relies on recv_coroutine() entering us only after we've yielded -
otherwise QEMU will crash.  The code and comments don't make it obvious
why this is guaranteed to be safe.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]