aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-08-03 10:49:04 +0200
committerAnthony Liguori <aliguori@us.ibm.com>2011-08-12 08:27:00 -0500
commite44089c79da29ba026d0083e1428b4e82763eeab (patch)
tree9012a76cf759a5b265b913da410bb34d78c15ae8 /hw
parent4333979e3d8c129953bba36ed87ce543d33cbea1 (diff)
scsi-disk: no need to call scsi_req_data on a short read
In fact, if the HBA's transfer_data callback goes on with scsi_req_continue the request will be completed successfully instead of showing a failure. It can even cause a segmentation fault. An easy way to trigger it is "eject -f cd" during installation (during media test if the installer does something like that). Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/scsi-disk.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/scsi-disk.c b/hw/scsi-disk.c
index fa198f928c..e38d9f0b75 100644
--- a/hw/scsi-disk.c
+++ b/hw/scsi-disk.c
@@ -214,9 +214,6 @@ static int scsi_handle_rw_error(SCSIDiskReq *r, int error, int type)
bdrv_mon_event(s->bs, BDRV_ACTION_STOP, is_read);
vm_stop(VMSTOP_DISKFULL);
} else {
- if (type == SCSI_REQ_STATUS_RETRY_READ) {
- scsi_req_data(&r->req, 0);
- }
switch (error) {
case ENOMEM:
scsi_command_complete(r, CHECK_CONDITION,