diff options
author | Paolo Bonzini | 2019-07-29 23:34:16 +0200 |
---|---|---|
committer | John Snow | 2019-08-17 01:14:04 +0200 |
commit | 539343c0a47e19d5dd64d846d64d084d9793681f (patch) | |
tree | 89f44bbc711b000ba4661636f2b1cc83b878602e /hw/ide/core.c | |
parent | Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20190816'... (diff) | |
download | qemu-539343c0a47e19d5dd64d846d64d084d9793681f.tar.gz qemu-539343c0a47e19d5dd64d846d64d084d9793681f.tar.xz qemu-539343c0a47e19d5dd64d846d64d084d9793681f.zip |
dma-helpers: ensure AIO callback is invoked after cancellation
dma_aio_cancel unschedules the BH if there is one, which corresponds
to the reschedule_dma case of dma_blk_cb. This can stall the DMA
permanently, because dma_complete will never get invoked and therefore
nobody will ever invoke the original AIO callback in dbs->common.cb.
Fix this by invoking the callback (which is ensured to happen after
a bdrv_aio_cancel_async, or done manually in the dbs->bh case), and
add assertions to check that the DMA state machine is indeed waiting
for dma_complete or reschedule_dma, but never both.
Reported-by: John Snow <jsnow@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 20190729213416.1972-1-pbonzini@redhat.com
Signed-off-by: John Snow <jsnow@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
0 files changed, 0 insertions, 0 deletions