]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtip32xx: mtip_async_complete() bug fixes
authorSam Bradshaw <sbradshaw@micron.com>
Thu, 13 Mar 2014 21:33:30 +0000 (14:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 May 2014 14:59:34 +0000 (07:59 -0700)
commitc260938a788fec7a9819fe4907351468347603bc
tree4defb73cb1be3a8b3f4c9d6a72861f202c5f10e5
parent039c42311d46cff77dac8eded00cedb1fdba1ea9
mtip32xx: mtip_async_complete() bug fixes

commit 5eb9291c36c7d71d7c6c832d5a4f551eb8ac015d upstream.

This patch fixes 2 issues in the fast completion path:
1) Possible double completions / double dma_unmap_sg() calls due to lack
of atomicity in the check and subsequent dereference of the upper layer
callback function. Fixed with cmpxchg before unmap and callback.
2) Regression in unaligned IO constraining workaround for p420m devices.
Fixed by checking if IO is unaligned and using proper semaphore if so.

Signed-off-by: Sam Bradshaw <sbradshaw@micron.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/mtip32xx/mtip32xx.c
drivers/block/mtip32xx/mtip32xx.h