Am 18.04.2017 um 12:27 schrieb Denis V. Lunev:
From: Anton Nefedov <[email protected]>

We should wait for other coroutines on error path, i.e. one of coroutines
terminates with i/o error, before cleaning the common structures. In the
other case we would crash in a lot of different places. This behaviour
was introduced by commit 2d9187bc65.

Signed-off-by: Anton Nefedov <[email protected]>
Signed-off-by: Denis V. Lunev <[email protected]>
CC: Peter Lieven <[email protected]>
CC: Kevin Wolf <[email protected]>
CC: Max Reitz <[email protected]>
---
  qemu-img.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qemu-img.c b/qemu-img.c
index b220cf7..3b04c5f 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -1899,7 +1899,7 @@ static int convert_do_copy(ImgConvertState *s)
          qemu_coroutine_enter(s->co[i]);
      }
- while (s->ret == -EINPROGRESS) {
+    while (s->running_coroutines) {
          main_loop_wait(false);
      }

Reviewed-by: Peter Lieven <[email protected]>


Thanks for catching this.


Peter



Reply via email to