]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
crypto: talitos - fix hashing
authorLEROY Christophe <christophe.leroy@c-s.fr>
Wed, 13 Sep 2017 10:44:57 +0000 (12:44 +0200)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 12 Oct 2017 21:20:18 +0000 (16:20 -0500)
BugLink: http://bugs.launchpad.net/bugs/1721777
commit 886a27c0fc8a34633aadb0986dba11d8c150ae2e upstream.

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

Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/crypto/talitos.c

index 27244571001afdeb95e0dc80753c88b0750c94d0..dff88838dce762c33ca7e898420f051c3a2f80cb 100644 (file)
@@ -1769,7 +1769,7 @@ static int common_nonsnoop_hash(struct talitos_edesc *edesc,
 
        sg_count = edesc->src_nents ?: 1;
        if (is_sec1 && sg_count > 1)
-               sg_copy_to_buffer(areq->src, sg_count, edesc->buf, length);
+               sg_copy_to_buffer(req_ctx->psrc, sg_count, edesc->buf, length);
        else
                sg_count = dma_map_sg(dev, req_ctx->psrc, sg_count,
                                      DMA_TO_DEVICE);