linux/drivers/crypto/marvell
Romain Perier 09951d83fc crypto: marvell - Update transformation context for each dequeued req
So far, sub part of mv_cesa_int was responsible of dequeuing complete
requests, then call the 'cleanup' operation on these reqs and call the
crypto api callback 'complete'. The problem is that the transformation
context 'ctx' is retrieved only once before the while loop. Which means
that the wrong 'cleanup' operation might be called on the wrong type of
cesa requests, it can lead to memory corruptions with this message:

marvell-cesa f1090000.crypto: dma_pool_free cesa_padding, 5a5a5a5a/5a5a5a5a (bad dma)

This commit fixes the issue, by updating the transformation context for
each dequeued cesa request.

Fixes: commit 85030c5168 ("crypto: marvell - Add support for chai...")
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2016-08-09 18:47:30 +08:00
..
cesa.c crypto: marvell - Update transformation context for each dequeued req 2016-08-09 18:47:30 +08:00
cesa.h crypto: marvell - Add support for chaining crypto requests in TDMA mode 2016-06-23 18:29:51 +08:00
cipher.c crypto: marvell - Don't copy IV vectors from the _process op for ciphers 2016-07-29 18:30:17 +08:00
hash.c crypto: marvell - make mv_cesa_ahash_cache_req() return bool 2016-08-09 18:47:30 +08:00
Makefile
tdma.c crypto: marvell - be explicit about destination in mv_cesa_dma_add_op() 2016-08-09 18:47:29 +08:00