qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [6892] Fix vectored aio bounce handling immediate errors (A


From: Anthony Liguori
Subject: [Qemu-devel] [6892] Fix vectored aio bounce handling immediate errors (Avi Kivity)
Date: Sat, 28 Mar 2009 16:11:21 +0000

Revision: 6892
          http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6892
Author:   aliguori
Date:     2009-03-28 16:11:20 +0000 (Sat, 28 Mar 2009)
Log Message:
-----------
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 <address@hidden>
Signed-off-by: Anthony Liguori <address@hidden>

Modified Paths:
--------------
    trunk/block.c

Modified: trunk/block.c
===================================================================
--- trunk/block.c       2009-03-28 15:58:58 UTC (rev 6891)
+++ trunk/block.c       2009-03-28 16:11:20 UTC (rev 6892)
@@ -1306,6 +1306,11 @@
         s->aiocb = bdrv_aio_read(bs, sector_num, s->bounce, nb_sectors,
                                  bdrv_aio_rw_vector_cb, s);
     }
+    if (!s->aiocb) {
+        qemu_vfree(s->bounce);
+        qemu_aio_release(s);
+        return NULL;
+    }
     return &s->common;
 }
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]