diff options
author | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2017-05-05 11:57:45 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-05-14 18:22:18 +0530 |
commit | 2aab4e18152cd30cb5d2f4c27629fc8a04aed979 (patch) | |
tree | aea9f8089f1fd2e386d0a871abacd7421590e715 /crypto/ecdh.c | |
parent | eb8df543e444492328f506adffc7dfe94111f1bd (diff) | |
download | linux-2aab4e18152cd30cb5d2f4c27629fc8a04aed979.tar.bz2 |
dmaengine: mv_xor_v2: properly handle wrapping in the array of HW descriptors
mv_xor_v2_tasklet() is looping over completed HW descriptors. Before the
loop, it initializes 'next_pending_hw_desc' to the first HW descriptor
to handle, and then the loop simply increments this point, without
taking care of wrapping when we reach the last HW descriptor. The
'pending_ptr' index was being wrapped back to 0 at the end, but it
wasn't used in each iteration of the loop to calculate
next_pending_hw_desc.
This commit fixes that, and makes next_pending_hw_desc a variable local
to the loop itself.
Fixes: 19a340b1a820 ("dmaengine: mv_xor_v2: new driver")
Cc: <stable@vger.kernel.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'crypto/ecdh.c')
0 files changed, 0 insertions, 0 deletions