diff options
| author | Kevin Wolf | 2018-08-17 18:54:18 +0200 |
|---|---|---|
| committer | Kevin Wolf | 2018-09-25 15:50:15 +0200 |
| commit | aa1361d54aac43094b98024b8b6c804eb6e41661 (patch) | |
| tree | 5ae88b570aa3073f13e15c57e0594633b6d42584 /include/exec/exec-all.h | |
| parent | test-bdrv-drain: Test AIO_WAIT_WHILE() in completion callback (diff) | |
| download | qemu-aa1361d54aac43094b98024b8b6c804eb6e41661.tar.gz qemu-aa1361d54aac43094b98024b8b6c804eb6e41661.tar.xz qemu-aa1361d54aac43094b98024b8b6c804eb6e41661.zip | |
block: Add missing locking in bdrv_co_drain_bh_cb()
bdrv_do_drained_begin/end() assume that they are called with the
AioContext lock of bs held. If we call drain functions from a coroutine
with the AioContext lock held, we yield and schedule a BH to move out of
coroutine context. This means that the lock for the home context of the
coroutine is released and must be re-acquired in the bottom half.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/exec/exec-all.h')
0 files changed, 0 insertions, 0 deletions
