Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
"A single fix this time: a fix for a virtqueue removal bug which only
appears to affect S390, but which results in the queue hanging forever
thus causing the machine to fail shutdown"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
scsi: virtio_scsi: Reject commands when virtqueue is broken

+10 -1
+10 -1
drivers/scsi/virtio_scsi.c
··· 534 534 { 535 535 struct Scsi_Host *shost = virtio_scsi_host(vscsi->vdev); 536 536 struct virtio_scsi_cmd *cmd = scsi_cmd_priv(sc); 537 + unsigned long flags; 537 538 int req_size; 539 + int ret; 538 540 539 541 BUG_ON(scsi_sg_count(sc) > shost->sg_tablesize); 540 542 ··· 564 562 req_size = sizeof(cmd->req.cmd); 565 563 } 566 564 567 - if (virtscsi_kick_cmd(req_vq, cmd, req_size, sizeof(cmd->resp.cmd)) != 0) 565 + ret = virtscsi_kick_cmd(req_vq, cmd, req_size, sizeof(cmd->resp.cmd)); 566 + if (ret == -EIO) { 567 + cmd->resp.cmd.response = VIRTIO_SCSI_S_BAD_TARGET; 568 + spin_lock_irqsave(&req_vq->vq_lock, flags); 569 + virtscsi_complete_cmd(vscsi, cmd); 570 + spin_unlock_irqrestore(&req_vq->vq_lock, flags); 571 + } else if (ret != 0) { 568 572 return SCSI_MLQUEUE_HOST_BUSY; 573 + } 569 574 return 0; 570 575 } 571 576