[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v4 9/9] virtio-scsi: handle virtio_scsi_set_config()
From: |
Greg Kurz |
Subject: |
[Qemu-devel] [PATCH v4 9/9] virtio-scsi: handle virtio_scsi_set_config() error |
Date: |
Fri, 30 Sep 2016 17:13:48 +0200 |
User-agent: |
StGit/0.17.1-dirty |
This error is caused by a buggy guest: let's switch the device to the
broken state instead of terminating QEMU.
Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
---
v4: - added Stefan's R-b tag
---
hw/scsi/virtio-scsi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index b58de956b684..6eaadd8d7c7d 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -644,8 +644,9 @@ static void virtio_scsi_set_config(VirtIODevice *vdev,
if ((uint32_t) virtio_ldl_p(vdev, &scsiconf->sense_size) >= 65536 ||
(uint32_t) virtio_ldl_p(vdev, &scsiconf->cdb_size) >= 256) {
- error_report("bad data written to virtio-scsi configuration space");
- exit(1);
+ virtio_error(vdev,
+ "bad data written to virtio-scsi configuration space");
+ return;
}
vs->sense_size = virtio_ldl_p(vdev, &scsiconf->sense_size);
- [Qemu-devel] [PATCH v4 0/9] virtio: avoid inappropriate QEMU termination in device code, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 1/9] virtio-9p: add parentheses to sizeof operator, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 2/9] virtio-blk: make some functions static, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 3/9] virtio-9p: handle handle_9p_output() error, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 4/9] virtio-blk: handle virtio_blk_handle_request() errors, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 5/9] virtio-net: handle virtio_net_handle_ctrl() error, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 6/9] virtio-net: handle virtio_net_receive() errors, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 7/9] virtio-net: handle virtio_net_flush_tx() errors, Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 8/9] virtio-scsi: convert virtio_scsi_bad_req() to use virtio_error(), Greg Kurz, 2016/09/30
- [Qemu-devel] [PATCH v4 9/9] virtio-scsi: handle virtio_scsi_set_config() error,
Greg Kurz <=
- Re: [Qemu-devel] [PATCH v4 0/9] virtio: avoid inappropriate QEMU termination in device code, no-reply, 2016/09/30