]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
Merge remote-tracking branch 'remotes/rth/tags/pull-axp-20190825' into staging
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 27 Aug 2019 09:00:51 +0000 (10:00 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Tue, 27 Aug 2019 09:00:51 +0000 (10:00 +0100)
Fix for alpha_cpu_tlb_fill

# gpg: Signature made Sun 25 Aug 2019 20:35:22 BST
# gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
# gpg:                issuer "richard.henderson@linaro.org"
# gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
# Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F

* remotes/rth/tags/pull-axp-20190825:
  target/alpha: fix tlb_fill trap_arg2 value for instruction fetch

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/scsi/vhost-user-scsi.c
util/async.c

index 31c9d34637b6f33128ded17f689769f4d7dd4d0a..6a6c15dd32f07e0c38b03b45ec96047bf8d0ad6f 100644 (file)
@@ -93,7 +93,7 @@ static void vhost_user_scsi_realize(DeviceState *dev, Error **errp)
     }
 
     vsc->dev.nvqs = 2 + vs->conf.num_queues;
-    vsc->dev.vqs = g_new(struct vhost_virtqueue, vsc->dev.nvqs);
+    vsc->dev.vqs = g_new0(struct vhost_virtqueue, vsc->dev.nvqs);
     vsc->dev.vq_index = 0;
     vsc->dev.backend_features = 0;
     vqs = vsc->dev.vqs;
index 8d2105729c147a54d17bd3dcce65d82d80ada049..4e4c7af51e0e776bffdf4156d244c6b114fe3c8f 100644 (file)
@@ -459,9 +459,17 @@ void aio_co_schedule(AioContext *ctx, Coroutine *co)
         abort();
     }
 
+    /* The coroutine might run and release the last ctx reference before we
+     * invoke qemu_bh_schedule().  Take a reference to keep ctx alive until
+     * we're done.
+     */
+    aio_context_ref(ctx);
+
     QSLIST_INSERT_HEAD_ATOMIC(&ctx->scheduled_coroutines,
                               co, co_scheduled_next);
     qemu_bh_schedule(ctx->co_schedule_bh);
+
+    aio_context_unref(ctx);
 }
 
 void aio_co_wake(struct Coroutine *co)