crypto: marvell - Don't overwrite default creq->state during initialization
authorRomain Perier <romain.perier@free-electrons.com>
Tue, 9 Aug 2016 09:03:19 +0000 (11:03 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 9 Aug 2016 10:47:31 +0000 (18:47 +0800)
commit57cfda1ac74e58767f6305bd1ea3449177425460
treecd75025aebac911c6032866a0a8ff4d0dff3d65d
parent09951d83fc58a6f772de09c08e370f6d9970dbb6
crypto: marvell - Don't overwrite default creq->state during initialization

Currently, in mv_cesa_{md5,sha1,sha256}_init creq->state is initialized
before the call to mv_cesa_ahash_init. This is wrong because this
function fills creq with zero by using memset, so its 'state' that
contains the default DIGEST is overwritten. This commit fixes the issue
by initializing creq->state just after the call to mv_cesa_ahash_init.

Fixes: commit b0ef51067cb4 ("crypto: marvell/cesa - initialize hash...")
Signed-off-by: Romain Perier <romain.perier@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/marvell/hash.c