From 5eb9291c36c7d71d7c6c832d5a4f551eb8ac015d Mon Sep 17 00:00:00 2001 From: Sam Bradshaw Date: Thu, 13 Mar 2014 14:33:30 -0700 Subject: [PATCH] mtip32xx: mtip_async_complete() bug fixes 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 Cc: stable@kernel.org Signed-off-by: Jens Axboe --- Reading git-format-patch failed