linux-stable/drivers/crypto/inside-secure
Antoine Tenart 199d97815d crypto: inside-secure - avoid unmapping DMA memory that was not mapped
commit c957f8b3e2 upstream.

This patch adds a parameter in the SafeXcel ahash request structure to
keep track of the number of SG entries mapped. This allows not to call
dma_unmap_sg() when dma_map_sg() wasn't called in the first place. This
also removes a warning when the debugging of the DMA-API is enabled in
the kernel configuration: "DMA-API: device driver tries to free DMA
memory it has not allocated".

Fixes: 1b44c5a60c ("crypto: inside-secure - add SafeXcel EIP197 crypto engine driver")
Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-03 17:38:50 +01:00
..
Makefile
safexcel.c crypto: inside-secure - fix an error handling path in safexcel_probe() 2017-08-22 14:54:55 +08:00
safexcel.h crypto: inside-secure - increase the batch size 2017-06-20 11:21:47 +08:00
safexcel_cipher.c crypto: inside-secure - fix gcc-4.9 warnings 2017-09-20 17:42:41 +08:00
safexcel_hash.c crypto: inside-secure - avoid unmapping DMA memory that was not mapped 2018-02-03 17:38:50 +01:00
safexcel_ring.c crypto: inside-secure - use the base_end pointer in ring rollback 2017-06-20 11:21:48 +08:00