[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 69/77] libvhost-user: Report descriptor index on panic
From: |
Michael Roth |
Subject: |
[PATCH 69/77] libvhost-user: Report descriptor index on panic |
Date: |
Thu, 3 Sep 2020 15:59:27 -0500 |
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>
(cherry picked from commit 8fe9805c73c277dc2feeaa83de73d6a58bf23f39)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.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 3bca996c62..301f6d68b3 100644
--- a/contrib/libvhost-user/libvhost-user.c
+++ b/contrib/libvhost-user/libvhost-user.c
@@ -1867,7 +1867,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;
}
@@ -1926,7 +1926,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;
}
--
2.17.1
- [PATCH 56/77] target/hppa: Free some temps in do_sub, (continued)
- [PATCH 56/77] target/hppa: Free some temps in do_sub, Michael Roth, 2020/09/03
- [PATCH 57/77] tpm: tpm_spapr: Exit on TPM backend failures, Michael Roth, 2020/09/03
- [PATCH 58/77] tests: tpm: Skip over pcrUpdateCounter byte in result comparison, Michael Roth, 2020/09/03
- [PATCH 59/77] qdev: Fix device_add DRIVER,help to print to monitor, Michael Roth, 2020/09/03
- [PATCH 60/77] virtio-balloon: Prevent guest from starting a report when we didn't request one, Michael Roth, 2020/09/03
- [PATCH 05/77] net: Do not include a newline in the id of -nic devices, Michael Roth, 2020/09/03
- [PATCH 61/77] virtio-balloon: Add locking to prevent possible race when starting hinting, Michael Roth, 2020/09/03
- [PATCH 63/77] linux-headers: update against Linux 5.7-rc3, Michael Roth, 2020/09/03
- [PATCH 65/77] virtio: list legacy-capable devices, Michael Roth, 2020/09/03
- [PATCH 67/77] intel_iommu: Use correct shift for 256 bits qi descriptor, Michael Roth, 2020/09/03
- [PATCH 69/77] libvhost-user: Report descriptor index on panic,
Michael Roth <=
- [PATCH 06/77] nbd/server: Avoid long error message assertions CVE-2020-10761, Michael Roth, 2020/09/03
- [PATCH 71/77] migration/block-dirty-bitmap: fix dirty_bitmap_mig_before_vm_start, Michael Roth, 2020/09/03
- [PATCH 64/77] virtio-balloon: Replace free page hinting references to 'report' with 'hint', Michael Roth, 2020/09/03
- [PATCH 66/77] virtio: verify that legacy support is not accidentally on, Michael Roth, 2020/09/03
- [PATCH 68/77] virtio-pci: Changed vdev to proxy for VirtIO PCI BAR callbacks., Michael Roth, 2020/09/03
- [PATCH 62/77] virtio-balloon: always indicate S_DONE when migration fails, Michael Roth, 2020/09/03
- [PATCH 72/77] block: Fix bdrv_aligned_p*v() for qiov_offset != 0, Michael Roth, 2020/09/03
- [PATCH 73/77] iotests/028: Add test for cross-base-EOF reads, Michael Roth, 2020/09/03
- [PATCH 74/77] nbd: Fix large trim/zero requests, Michael Roth, 2020/09/03