]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitca7697878aa78f7b4e237913e9378ee963d9eb52
treecd75025aebac911c6032866a0a8ff4d0dff3d65d
parent346fdc4509fa7262dd1f8aa42c68239fc67c7df7
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 01b9af722f5a ("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