summaryrefslogtreecommitdiff
path: root/drivers/crypto
diff options
context:
space:
mode:
authorSteve Cornelius <steve.cornelius@freescale.com>2012-06-29 15:53:46 -0700
committerJason Liu <r64343@freescale.com>2012-07-20 13:39:26 +0800
commit869a87a535a4ba3a3b62ac6c822fac259b9d014b (patch)
tree1f00188369d737543a1cc17106145a44a59d6aad /drivers/crypto
parentbf839af420f06b2553251440770f048270ce7a04 (diff)
ENGR00215492-1: Fix DMA size in extended descriptor for ahash_digest()
Save of DMA size in extended descriptor was missing, thus crashes could occur during post-request unmapping. Also, removed lingering DEBUG def that shouldn't have been there. Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com> Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/caam/caamhash.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index 85eaa95eda3e..d36582b0c072 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -89,7 +89,6 @@
#define HASH_MSG_LEN 8
#define MAX_CTX_LEN (HASH_MSG_LEN + SHA512_DIGEST_SIZE)
-#define DEBUG
#ifdef DEBUG
/* for print_hex_dumps with line references */
#define xstr(s) str(s)
@@ -1095,6 +1094,7 @@ static int ahash_digest(struct ahash_request *req)
DESC_JOB_IO_LEN;
edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg,
sec4_sg_bytes, DMA_TO_DEVICE);
+ edesc->sec4_sg_bytes = sec4_sg_bytes;
dma_sync_single_for_device(jrdev, edesc->sec4_sg_dma, sec4_sg_bytes,
DMA_TO_DEVICE);
edesc->src_nents = src_nents;