Message ID | 20221205175056.20806-2-tim.gardner@canonical.com |
---|---|
State | New |
Headers | show |
Series | UBUNTU: SAUCE: scsi: storvsc: Fix swiotlb bounce buffer leak in confidential VM | expand |
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c index 302a29a8fd90..e817af18846e 100644 --- a/drivers/scsi/storvsc_drv.c +++ b/drivers/scsi/storvsc_drv.c @@ -1887,6 +1887,9 @@ static int storvsc_queuecommand(struct Scsi_Host *host, struct scsi_cmnd *scmnd) ret = storvsc_do_io(dev, cmd_request, get_cpu()); put_cpu(); + if (ret) + scsi_dma_unmap(scmnd); + if (ret == -EAGAIN) { /* no more space */ ret = SCSI_MLQUEUE_DEVICE_BUSY;