OSDN Git Service

3w-9xxx: fix command completion race
authorChristoph Hellwig <hch@lst.de>
Thu, 23 Apr 2015 07:48:51 +0000 (09:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 May 2015 12:14:29 +0000 (05:14 -0700)
commit457eb9e105684d84b74df66c6365321af1907586
tree8f876b8a537f041fa1e94bd21e6880726b13285e
parent65dabc13bb2707d7a04be0b6ed031442f7b18a87
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/3w-9xxx.c
drivers/scsi/3w-9xxx.h