[PATCH 1/1]: pmcraid driver fix to avoid twice scsi_dma_unmap for a command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For a particular driver error condition, driver was doing double 
scsi_dma_unmaps. Driver was calling scsi_dma_unmap in  
pmcraid_error_handler and return 0. This pmcraid_error_handler is called 
by pmcraid_io_done which will do scsi_dma_unmap again when it has 
return 0 from pmcraid_error_handler.

pmcraid.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

--- scsi-misc-2.6.orig/drivers/scsi/pmcraid.c	2009-12-17 13:32:19.000000000 -0800
+++ scsi-misc-2.6/drivers/scsi/pmcraid.c	2009-12-17 13:58:58.000000000 -0800
@@ -2483,14 +2483,12 @@
 			sense_copied = 1;
 		}
 
-		if (RES_IS_GSCSI(res->cfg_entry)) {
+		if (RES_IS_GSCSI(res->cfg_entry))
 			pmcraid_cancel_all(cmd, sense_copied);
-		} else if (sense_copied) {
+		else if (sense_copied)
 			pmcraid_erp_done(cmd);
-			return 0;
-		} else  {
+		else
 			pmcraid_request_sense(cmd);
-		}
 
 		return 1;
 


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux