3w-9xxx: fix command completion race

[ Upstream commit 118c855b56 ]

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>
Cc: stable@vger.kernel.org
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
This commit is contained in:
Christoph Hellwig 2015-04-23 09:48:51 +02:00 • committed by Sasha Levin
commit d722b89103
2 changed files with 13 additions and 49 deletions