]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
3w-xxxx: fix command completion race
authorChristoph Hellwig <hch@lst.de>
Thu, 23 Apr 2015 07:48:50 +0000 (09:48 +0200)
committerZefan Li <lizefan@huawei.com>
Fri, 18 Sep 2015 01:20:34 +0000 (09:20 +0800)
commit4d5e62fd67336f7d50aba82914d0e237d248e633
tree6947b11b3ded7bd85a3c83bb8857c88bc99f9258
parente456c24edd39485e1542173343e3cb53d505c612
3w-xxxx: fix command completion race

commit 9cd9554615cba14f0877cc9972a6537ad2bdde61 upstream.

The 3w-xxxx 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>
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Zefan Li <lizefan@huawei.com>
drivers/scsi/3w-xxxx.c
drivers/scsi/3w-xxxx.h