[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 5/7] libvhost-user: Report descriptor index on panic
From: |
Michael S. Tsirkin |
Subject: |
[PULL 5/7] libvhost-user: Report descriptor index on panic |
Date: |
Mon, 27 Jul 2020 09:49:47 -0400 |
From: Philippe Mathieu-Daudé <philmd@redhat.com>
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>
---
contrib/libvhost-user/libvhost-user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/contrib/libvhost-user/libvhost-user.c
b/contrib/libvhost-user/libvhost-user.c
index d315db1396..53f16bdf08 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;
}
--
MST
- [PULL 0/7] virtio,pci: bugfixes, Michael S. Tsirkin, 2020/07/27
- [PULL 1/7] virtio-mem-pci: force virtio version 1, Michael S. Tsirkin, 2020/07/27
- [PULL 2/7] hw/pci-host: save/restore pci host config register, Michael S. Tsirkin, 2020/07/27
- [PULL 3/7] hw/pci-host: save/restore pci host config register for old ones, Michael S. Tsirkin, 2020/07/27
- [PULL 4/7] Fix vhost-user buffer over-read on ram hot-unplug, Michael S. Tsirkin, 2020/07/27
- [PULL 5/7] libvhost-user: Report descriptor index on panic,
Michael S. Tsirkin <=
- [PULL 6/7] vhost-vdpa :Fix Coverity CID 1430270 / CID 1420267, Michael S. Tsirkin, 2020/07/27
- [PULL 7/7] MAINTAINERS: Cover the firmware JSON schema, Michael S. Tsirkin, 2020/07/27