* [PATCH] ibmvscsi: Correct DMA mapping leak
@ 2009-01-22 19:40 Robert Jennings
2009-01-28 14:45 ` Brian King
0 siblings, 1 reply; 2+ messages in thread
From: Robert Jennings @ 2009-01-22 19:40 UTC (permalink / raw)
To: linux-scsi; +Cc: James.Bottomley, Brian King
The ibmvscsi client driver is not unmapping the SCSI command after
encountering a DMA mapping error while trying to map an indirect
scattergather list for the event pool. This leads to a leak of DMA
entitlement that could result in the device failing future DMA operations
in a CMO environment.
Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
---
drivers/scsi/ibmvscsi/ibmvscsi.c | 1 +
1 file changed, 1 insertion(+)
Index: b/drivers/scsi/ibmvscsi/ibmvscsi.c
===================================================================
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -432,6 +432,7 @@ static int map_sg_data(struct scsi_cmnd
sdev_printk(KERN_ERR, cmd->device,
"Can't allocate memory "
"for indirect table\n");
+ scsi_dma_unmap(cmd);
return 0;
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ibmvscsi: Correct DMA mapping leak
2009-01-22 19:40 [PATCH] ibmvscsi: Correct DMA mapping leak Robert Jennings
@ 2009-01-28 14:45 ` Brian King
0 siblings, 0 replies; 2+ messages in thread
From: Brian King @ 2009-01-28 14:45 UTC (permalink / raw)
To: Robert Jennings; +Cc: linux-scsi, James.Bottomley
Acked by: Brian King <brking@linux.vnet.ibm.com>
Robert Jennings wrote:
> The ibmvscsi client driver is not unmapping the SCSI command after
> encountering a DMA mapping error while trying to map an indirect
> scattergather list for the event pool. This leads to a leak of DMA
> entitlement that could result in the device failing future DMA operations
> in a CMO environment.
>
> Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
> ---
> drivers/scsi/ibmvscsi/ibmvscsi.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: b/drivers/scsi/ibmvscsi/ibmvscsi.c
> ===================================================================
> --- a/drivers/scsi/ibmvscsi/ibmvscsi.c
> +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
> @@ -432,6 +432,7 @@ static int map_sg_data(struct scsi_cmnd
> sdev_printk(KERN_ERR, cmd->device,
> "Can't allocate memory "
> "for indirect table\n");
> + scsi_dma_unmap(cmd);
> return 0;
> }
> }
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Brian King
Linux on Power Virtualization
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-28 14:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-22 19:40 [PATCH] ibmvscsi: Correct DMA mapping leak Robert Jennings
2009-01-28 14:45 ` Brian King
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.