]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 31 Oct 2016 11:02:09 +0000 (05:02 -0600)
commit1b1e27ab4f7ae68a260047bac33571ee1cd45b5b
treecd6bd2d3427a4ab0976147b44819ec0e6320651d
parentf163372f569bf80fd3d14bcedb1a31aa1f954a1d
crypto: marvell - Don't overwrite default creq->state during initialization

commit 57cfda1ac74e58767f6305bd1ea3449177425460 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/marvell/hash.c