aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <philmd@redhat.com>2020-07-23 19:19:35 +0200
committerMichael S. Tsirkin <mst@redhat.com>2020-07-27 10:28:28 -0400
commit8fe9805c73c277dc2feeaa83de73d6a58bf23f39 (patch)
tree6ba8038dfa4bcab79c9426bc22eacf613423dd51 /contrib
parent4fdecf0543b49b8e171510104f3117538b9d1fe9 (diff)
downloadqemu-8fe9805c73c277dc2feeaa83de73d6a58bf23f39.zip
qemu-8fe9805c73c277dc2feeaa83de73d6a58bf23f39.tar.gz
qemu-8fe9805c73c277dc2feeaa83de73d6a58bf23f39.tar.bz2
libvhost-user: Report descriptor index on panic
We want to report the index of the descriptor, not its pointer. Fixes: 7b2e5c65f4 ("contrib: add libvhost-user") Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20200723171935.18535-1-philmd@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Raphael Norwitz <raphael.norwitz@nutanix.com> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/libvhost-user/libvhost-user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/libvhost-user/libvhost-user.c b/contrib/libvhost-user/libvhost-user.c
index d315db1..53f16bd 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -2074,7 +2074,7 @@ virtqueue_get_head(VuDev *dev, VuVirtq *vq,
/* If their number is silly, that's a fatal mistake. */
if (*head >= vq->vring.num) {
- vu_panic(dev, "Guest says index %u is available", head);
+ vu_panic(dev, "Guest says index %u is available", *head);
return false;
}
@@ -2133,7 +2133,7 @@ virtqueue_read_next_desc(VuDev *dev, struct vring_desc *desc,
smp_wmb();
if (*next >= max) {
- vu_panic(dev, "Desc next is %u", next);
+ vu_panic(dev, "Desc next is %u", *next);
return VIRTQUEUE_READ_DESC_ERROR;
}