diff options
author | LEROY Christophe <christophe.leroy@c-s.fr> | 2017-09-13 06:44:57 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-09-20 05:42:40 -0400 |
commit | 886a27c0fc8a34633aadb0986dba11d8c150ae2e (patch) | |
tree | 62f9c47c92588cb71d9a250c912e606d79a2e3d6 | |
parent | afd62fa26343be6445479e75de9f07092a061459 (diff) |
crypto: talitos - fix hashing
md5sum on some files gives wrong result
Exemple:
With the md5sum from libkcapi:
c15115c05bad51113f81bdaee735dd09 test
With the original md5sum:
bbdf41d80ba7e8b2b7be3a0772be76cb test
This patch fixes this issue
Cc: <stable@vger.kernel.org>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/talitos.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 6596761bc0c8..8a48fc4f3642 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
@@ -1769,7 +1769,7 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc, | |||
1769 | 1769 | ||
1770 | sg_count = edesc->src_nents ?: 1; | 1770 | sg_count = edesc->src_nents ?: 1; |
1771 | if (is_sec1 && sg_count > 1) | 1771 | if (is_sec1 && sg_count > 1) |
1772 | sg_copy_to_buffer(areq->src, sg_count, edesc->buf, length); | 1772 | sg_copy_to_buffer(req_ctx->psrc, sg_count, edesc->buf, length); |
1773 | else | 1773 | else |
1774 | sg_count = dma_map_sg(dev, req_ctx->psrc, sg_count, | 1774 | sg_count = dma_map_sg(dev, req_ctx->psrc, sg_count, |
1775 | DMA_TO_DEVICE); | 1775 | DMA_TO_DEVICE); |