[lkml]   [2011]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[041/101] [SCSI] 3w-9xxx: fix iommu_iova leak
2.6.33-longterm review patch.  If anyone has any objections, please let us know.


From: James Bottomley <>

commit 96067723e46b0dd24ae7b934085ab4eff4d26a1b upstream.

Following reports on the list, it looks like the 3e-9xxx driver will leak dma
mappings every time we get a transient queueing error back from the card.
This is because it maps the sg list in the routine that sends the command, but
doesn't unmap again in the transient failure path (even though the command is
sent back to the block layer). Fix by unmapping before returning the status.

Reported-by: Chris Boot <>
Tested-by: Chris Boot <>
Acked-by: Adam Radford <>
Signed-off-by: James Bottomley <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/scsi/3w-9xxx.c | 2 ++
1 file changed, 2 insertions(+)

--- a/drivers/scsi/3w-9xxx.c
+++ b/drivers/scsi/3w-9xxx.c
@@ -1793,10 +1793,12 @@ static int twa_scsi_queue(struct scsi_cm
switch (retval) {
twa_free_request_id(tw_dev, request_id);
+ twa_unmap_scsi_data(tw_dev, request_id);
case 1:
tw_dev->state[request_id] = TW_S_COMPLETED;
twa_free_request_id(tw_dev, request_id);
+ twa_unmap_scsi_data(tw_dev, request_id);
SCpnt->result = (DID_ERROR << 16);
retval = 0;

 \ /
  Last update: 2011-11-03 02:59    [W:0.189 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site