]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
3w-sas: fix command completion race
authorChristoph Hellwig <hch@lst.de>
Thu, 23 Apr 2015 07:48:49 +0000 (09:48 +0200)
committerJiri Slaby <jslaby@suse.cz>
Fri, 15 May 2015 07:10:51 +0000 (09:10 +0200)
commitd5b20f8669e4109e91ee7d6daf3bbd46d8385b03
tree05da7c163ad99bdde46e0e7e9e7173eaf7cc2702
parentc5907e12ec84e9e9990f9309ca0beae8200b4369
3w-sas: fix command completion race

commit 579d69bc1fd56d5af5761969aa529d1d1c188300 upstream.

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>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/scsi/3w-sas.c
drivers/scsi/3w-sas.h