The block layer can signal aio errors in two ways: by calling the completion
function with a negative status code, or by returning a NULL aiocb. Two of
the synthetic aio implementations (the DMA API and the vectored aio bouncing)
fail to handle the second case correctly, resulting in crashes when
cancellation of a timed out request is attempted.
I think the long term fix is to have the block layer signal errors in just
one way -- by invoking the completion handler with a negative return code --
but in the meanwhile, here are patches that add the required error checking.
Avi Kivity (2):
Fix vectored aio bounce handling immediate errors
Fix DMA API when handling an immediate error from block layer
block.c | 5 +++++
dma-helpers.c | 27 +++++++++++++++++++++------
2 files changed, 26 insertions(+), 6 deletions(-)