aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/3w-sas.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2015-04-23 09:48:49 +0200
committerJames Bottomley <JBottomley@Odin.com>2015-04-27 10:04:39 -0700
commit579d69bc1fd56d5af5761969aa529d1d1c188300 (patch)
tree0596feafadf90a837647d3e1b473c41b9fbecbac /drivers/scsi/3w-sas.h
parentaha1542: Allocate memory before taking a lock (diff)
downloadlinux-dev-579d69bc1fd56d5af5761969aa529d1d1c188300.tar.xz
linux-dev-579d69bc1fd56d5af5761969aa529d1d1c188300.zip
3w-sas: fix command completion race
The 3w-sas driver needs to tear down the dma mappings before returning the command to the midlayer, as there is no guarantee the sglist and count are valid after that point. Also remove the dma mapping helpers which have another inherent race due to the request_id index. Signed-off-by: Christoph Hellwig <hch@lst.de> Reported-by: Torsten Luettgert <ml-lkml@enda.eu> Tested-by: Bernd Kardatzki <Bernd.Kardatzki@med.uni-tuebingen.de> Cc: stable@vger.kernel.org Acked-by: Adam Radford <aradford@gmail.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/3w-sas.h')
-rw-r--r--drivers/scsi/3w-sas.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/scsi/3w-sas.h b/drivers/scsi/3w-sas.h
index d474892701d4..fec6449c7595 100644
--- a/drivers/scsi/3w-sas.h
+++ b/drivers/scsi/3w-sas.h
@@ -103,10 +103,6 @@ static char *twl_aen_severity_table[] =
#define TW_CURRENT_DRIVER_BUILD 0
#define TW_CURRENT_DRIVER_BRANCH 0
-/* Phase defines */
-#define TW_PHASE_INITIAL 0
-#define TW_PHASE_SGLIST 2
-
/* Misc defines */
#define TW_SECTOR_SIZE 512
#define TW_MAX_UNITS 32