]> 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)
committerJiri Slaby <jslaby@suse.cz>
Fri, 15 May 2015 07:10:50 +0000 (09:10 +0200)
commita91071e3085ecdcf00a4c3c80199cdc8b2123c02
tree3170782dc1e584e76ff02c1d6abdacad657dfd53
parent50a61d0ce8cadb9185b6fc47bcc99ce7bf69c62c
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: Jiri Slaby <jslaby@suse.cz>
drivers/scsi/3w-xxxx.c
drivers/scsi/3w-xxxx.h