Re: [Qemu-devel] [PATCH] util/async: hold AioContext ref to prevent use-after-free

2019-07-24 Thread Stefan Hajnoczi
On Tue, Jul 23, 2019 at 08:06:23PM +0100, Stefan Hajnoczi wrote: > The tests/test-bdrv-drain /bdrv-drain/iothread/drain test case does the > following: > > 1. The preadv coroutine calls aio_bh_schedule_oneshot() and then yields. > 2. The one-shot BH executes in another AioContext. All it does is

Re: [Qemu-devel] [PATCH] util/async: hold AioContext ref to prevent use-after-free

2019-07-24 Thread Paolo Bonzini
On 23/07/19 21:06, Stefan Hajnoczi wrote: > The tests/test-bdrv-drain /bdrv-drain/iothread/drain test case does the > following: > > 1. The preadv coroutine calls aio_bh_schedule_oneshot() and then yields. > 2. The one-shot BH executes in another AioContext. All it does is call >aio_co_wakeup

[Qemu-devel] [PATCH] util/async: hold AioContext ref to prevent use-after-free

2019-07-23 Thread Stefan Hajnoczi
The tests/test-bdrv-drain /bdrv-drain/iothread/drain test case does the following: 1. The preadv coroutine calls aio_bh_schedule_oneshot() and then yields. 2. The one-shot BH executes in another AioContext. All it does is call aio_co_wakeup(preadv_co). 3. The preadv coroutine is re-entered and