Commit c240b9af599d20e06a58090366be682684bd8555
1 parent
7cd0874c
Fix vectored aio bounce handling immediate errors (Avi Kivity)
If a bounced vectored aio fails immediately (the inner aio submission returning NULL) then the bounce handler erronously returns an aio request which will never be completed (and which crashes when cancelled). Fix by detecting that the inner request has failed and propagating the error. Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6892 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
5 additions
and
0 deletions
block.c
... | ... | @@ -1306,6 +1306,11 @@ static BlockDriverAIOCB *bdrv_aio_rw_vector(BlockDriverState *bs, |
1306 | 1306 | s->aiocb = bdrv_aio_read(bs, sector_num, s->bounce, nb_sectors, |
1307 | 1307 | bdrv_aio_rw_vector_cb, s); |
1308 | 1308 | } |
1309 | + if (!s->aiocb) { | |
1310 | + qemu_vfree(s->bounce); | |
1311 | + qemu_aio_release(s); | |
1312 | + return NULL; | |
1313 | + } | |
1309 | 1314 | return &s->common; |
1310 | 1315 | } |
1311 | 1316 | ... | ... |