]> git.baikalelectronics.ru Git - kernel.git/commit
3w-xxxx: fix command completion race
authorChristoph Hellwig <hch@lst.de>
Thu, 23 Apr 2015 07:48:50 +0000 (09:48 +0200)
committerJames Bottomley <JBottomley@Odin.com>
Mon, 27 Apr 2015 17:05:55 +0000 (10:05 -0700)
commit1d143eddb7301754b18d35116a8b502af0b01fb0
treec046377992e59614f19630da661f64436a507ccb
parenta1dc2ea5fd272b8affc3855908ac1f5db938b321
3w-xxxx: fix command completion race

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>
Cc: stable@vger.kernel.org
Acked-by: Adam Radford <aradford@gmail.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/3w-xxxx.c
drivers/scsi/3w-xxxx.h