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

commit 118c855b5623f3e2e6204f02623d88c09e0c34de upstream.

The 3w-9xxx 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-9xxx.c
drivers/scsi/3w-9xxx.h